Resistor Color Code & SMD Decoder
Decode 4–6 band resistor colors, reverse values into bands, and read SMD markings locally.
Examples
4.7 kΩ through-hole
decodeResistorBands(["yellow", "violet", "red", "gold"]){ value: 4700, tolerance: 5, formattedValue: "4.7 kΩ" }Yellow/violet give 47, red multiplies by 100, and gold sets ±5% tolerance.
EIA-96 marking
decodeSmdCode("01C"){ value: 10000, format: "eia-96", formattedValue: "10 kΩ" }Index 01 maps to 100 and multiplier C means ×100, yielding 10 kΩ.
About this tool
Resistor SMD Calculator decodes through-hole color bands with decodeResistorBands(bands): 4-band uses 2 digits, 5/6-band use 3 digits, and the result carries value, tolerance, tcr (sixth band only), and formattedValue. The reverse path encodeResistor(value, tolerance, bands, tcr) maps a value back to digit, multiplier, tolerance, and TCR colors.
SMD codes decode with decodeSmdCode(code): 3/4-digit codes read significant digits plus a zero-count multiplier, EIA-96 codes read a 01–96 index plus a Z–H multiplier letter, and "0"/"000" decode as 0 Ω jumpers. Supported digit colors are black–white, multipliers add gold/silver, and tolerances cover 0.05–10%.
Everything is deterministic and client-side: identical bands or codes always return identical values, errors are plain { error } objects, and formatting follows the Ω/kΩ/MΩ/GΩ scale.
How to use this tool
Decode color bands
Pass 4, 5, or 6 colors in order — e.g. ["yellow", "violet", "red", "gold"] for 4.7 kΩ ±5% — and read value plus tolerance.
Decode an SMD marking
Enter a 3/4-digit code ("4702" → 47 kΩ), an EIA-96 code ("01C" → 10 kΩ), or "0" for a jumper.
Encode a value
Call encodeResistor(4700, 5, 4) for the band colors, adding a TCR value (e.g. 100) when requesting 6 bands.
Handle errors
Branch on the { error } shape for bad band counts, invalid digit/multiplier colors, or unrecognized SMD codes.
Use cases
Reading PCB markings
Translate SMD codes stamped on boards into ohm values during repair or reverse-engineering.
Checking color bands
Verify a 4/5/6-band resistor's value and tolerance before soldering it in.
Documenting BOMs
Encode target values into standard band colors for assembly notes and schematics.
Common mistakes
Mistake:Reading digit bands in reverse order.
Fix:Bands read from the end nearest the edge — tolerance (gold/silver) is last, digits come first.
Mistake:Treating EIA-96 digits as a direct value.
Fix:The two digits are a lookup index (01 → 100), not the value — apply the multiplier letter before reading ohms.
Mistake:Expecting any tolerance on any band count.
Fix:Only the listed 0.05–10% tolerances encode; other values return an unsupported-tolerance error.
Frequently asked questions
What does this tool do?
It decodes through-hole color bands with decodeResistorBands and SMD markings with decodeSmdCode (3/4-digit, EIA-96, and 0 Ω jumpers), and encodes values back to bands with encodeResistor.
What is yellow-violet-red-gold, or EIA-96 01C?
Yellow-violet-red-gold is 47 × 100 = 4.7 kΩ ±5%. EIA-96 01C is index 01 (100) with multiplier C (×100) = 10 kΩ.
Is my data uploaded or stored?
No. Band math, SMD decoding, and formatting run entirely in your browser.
Why did I get an error object?
Band counts must be 4, 5, or 6 with valid digit/multiplier/tolerance colors, and SMD codes must be 3/4 digits or EIA-96 — anything else returns { error } describing the fix.
Related guides
References & standards
Related tools
Device Information
See what your browser reveals about your device — screen, hardware hints, platform and capabilities.
Digital Bubble Level
Measure surface tilt with a visual bullseye and a ±0.2° level threshold.
Digital Compass
Read a device heading with a manual desktop simulator and magnetic interference guidance.
Flashlight & Signal Beacon
Use a supported phone LED or a dimmable full-screen light with blink patterns, SOS and Morse signals.
GPS Speedometer
Track speed and distance from GPS with a Haversine fallback when speed is null.
I2C & SPI Bus Timing Diagram
Scan I2C device lists for address conflicts (7-bit/8-bit normalized) and inspect SPI CPOL/CPHA timing modes with pull-up and max-speed guidance. Runs entirely in your browser.