Not all capacitors are the same: an electrolytic in a power supply and a ceramic next to a microcontroller do very different jobs, and swapping one for the other can go wrong. In this guide you’ll see the four most common types, what each one is for, how to identify their polarity and how to choose a correct replacement.
In short
- Electrolytic: lots of capacitance in a small space, polarized. Power supply filtering and energy storage.
- Ceramic: small, cheap and non-polarized. The classic 100 nF decoupling cap next to every chip.
- Tantalum: compact and stable, polarized, and best used well below their voltage rating.
- Film: precise and long-lasting, non-polarized. Audio, filters and mains-connected circuits.
What a capacitor does
A capacitor stores electric charge between two plates separated by an insulator, the dielectric. The material of that dielectric is what sets one type apart from another and determines its capacitance, size, accuracy and maximum voltage.
Its most common uses:
- Filtering: smoothing a power supply’s voltage after the rectifier.
- Decoupling: absorbing a chip’s current spikes right at its power pins.
- Coupling: passing an AC signal while blocking DC.
- Timing: together with a resistor, setting time intervals in RC circuits.
Comparison table

| Aluminum electrolytic | Ceramic (MLCC) | Tantalum | Film | |
|---|---|---|---|---|
| Typical capacitance | 0.1 µF – tens of mF | 1 pF – tens of µF | 0.1 µF – hundreds of µF | 1 nF – tens of µF |
| Polarity | Yes | No | Yes | No |
| Common voltages | 6.3 – 450 V | 6.3 V – kV | 4 – 50 V | 50 V – kV |
| Accuracy | Low (±20%) | Very high to low depending on dielectric | Medium (±10–20%) | High (±5–10%) |
| Lifespan | Limited: they dry out | Very long | Long | Very long |
| Price | Low | Very low | Medium-high | Medium |
| Typical use | Power supply filtering | Decoupling, high frequency | Regulators, compact devices | Audio, filters, mains |
To read the value printed on a ceramic or film capacitor (104, 103, 472…), see the capacitor code calculator.
Aluminum electrolytic capacitors
These are the cylinders with a plastic sleeve that you see in almost every power supply. They achieve high capacitance thanks to an extremely thin oxide layer used as the dielectric.
Polarity
- The stripe on the sleeve (usually with
−signs) marks the negative lead. - The longer lead is the positive one (on new, uncut components).
- On the board, the silkscreen usually marks the negative side with a hatched or filled area, or the positive side with
+.
Connecting it backwards can make it heat up, bulge or burst. The tops of many electrolytics have cross-shaped scores precisely so they vent in a controlled way.
Lifespan and ESR
Their electrolyte gradually evaporates with time and heat. That’s why the manufacturer specifies a rated life in hours at maximum temperature, for example 2,000 h at 105 °C. As a rough rule, every 10 °C below that temperature doubles the life.
Another key spec is ESR (equivalent series resistance). Switching power supplies use low-ESR models: a standard one in their place heats up and the supply eventually fails.
Signs of a bad electrolytic: a bulging top, brown electrolyte residue at the base, a power supply that makes noise or a device that is slow to start.
Ceramic capacitors
They’re the most plentiful: small discs or, in SMD, tiny rectangles (MLCC, multilayer ceramic capacitor). They’re non-polarized and work very well at high frequency.
Dielectric classes
The dielectric code matters as much as the capacitance:
| Dielectric | Class | Stability | Use |
|---|---|---|---|
| C0G / NP0 | 1 | Very stable over temperature and voltage | Oscillators, filters, timing |
| X7R | 2 | Good (±15% from −55 to 125 °C) | Decoupling, general purpose |
| X5R | 2 | Good (±15% from −55 to 85 °C) | Decoupling with more capacitance in a small size |
| Y5V / Z5U | 2 | Poor: they can lose much of their capacitance | Only where the exact value doesn’t matter |
The effect of voltage (DC bias)
Class 2 ceramics lose capacitance when DC voltage is applied. A 10 µF, 6.3 V MLCC running at 5 V can end up at a fraction of its rated value. Manufacturers publish curves for this effect; if the actual capacitance matters, choose one with a higher voltage rating or a larger size.
The 100 nF decoupling cap
A 100 nF ceramic is placed next to the power pins of every integrated circuit, as close to its pins as possible. It absorbs the fast current spikes that long traces can’t supply in time. That’s why you’ll see so many of them on any microcontroller board.

Tantalum capacitors
They offer a lot of capacitance in a very small volume and are more stable than aluminum electrolytics. Through-hole ones are usually teardrop-shaped; SMD ones look like small blocks.
Polarity: the opposite of aluminum

- On SMD parts, the stripe marks the positive, exactly the opposite of an aluminum electrolytic.
- On teardrop ones, the positive lead is usually marked with
+or is the longer one.
Voltage: use them well below their rating
Manganese dioxide (MnO₂) tantalums can fail short, sometimes with smoke or flame, if they get voltage or current spikes. That’s why the classic industry recommendation is to run them at 50% of their voltage rating: for a 5 V circuit, one rated 10 V or more.
Polymer tantalums tolerate this use better and manufacturers recommend smaller derating, around 80% of the rated voltage depending on the model. Always check the datasheet.
Film capacitors
They use a plastic film as the dielectric. They’re usually colored rectangular blocks (yellow, red, blue). They’re non-polarized, accurate and barely age.
| Type | Material | Characteristics |
|---|---|---|
| MKT | Polyester (PET) | Small and cheap, general purpose |
| MKP | Polypropylene (PP) | Very low losses: audio, filters, high current |
| X2 | Certified film | Across line and neutral in mains circuits |
| Y2 | Certified film or ceramic | Between mains and ground or accessible parts |
X and Y capacitors are safety-rated: they’re designed so that if they fail, they don’t cause shocks or fires. In a mains-connected repair, they’re always replaced with one of the same class and voltage.
How to choose a replacement capacitor
Follow this list when replacing a bad one:
- Same type: electrolytic for electrolytic, ceramic for ceramic. Changing technology alters the ESR and can destabilize regulators.
- Same capacitance: within the original’s tolerance. In power supply filtering, a bit more capacitance usually isn’t a problem; in timing circuits or filters, it is.
- Equal or higher voltage: never lower. A 16 V part can replace a 10 V one; not the other way around.
- Equal or higher temperature: if the original is rated 105 °C, don’t fit an 85 °C one.
- ESR: in switching power supplies, look for the equivalent low-ESR series.
- Size and lead spacing: it has to fit on the board and not touch a heatsink.
- Polarity: check the silkscreen or take a photo before desoldering.
- Safety class (X/Y) on any mains-connected capacitor.
Example: the output capacitor of a 12 V switching power supply is a 1,000 µF, 16 V, 105 °C, low-ESR electrolytic. A valid replacement: 1,000 µF, 25 V, 105 °C, from a reputable manufacturer’s low-ESR series, with the same diameter.
For the swap, go over how to solder and desolder through-hole components.
Safety
Large capacitors hold their charge after the device is unplugged. The main electrolytic in a mains-powered supply can store over 150 V (over 300 V on 230 V mains) for minutes. Before touching it, discharge it with a suitable resistor (not a screwdriver) and check with the multimeter that the voltage is zero.
Common mistakes
| Mistake | Consequence | Fix |
|---|---|---|
| Electrolytic or tantalum backwards | Heating, bulging or explosion | Check the stripe and the silkscreen |
| Lower-voltage replacement | Premature failure | Equal or higher voltage rating |
| Standard electrolytic in a switching supply | It heats up and the supply fails | Use a low-ESR one |
| MnO₂ tantalum at its voltage limit | Short circuit with smoke | Derate to 50% of its voltage rating |
| Y5V where the value matters | Actual capacitance much lower | Use X7R, X5R or C0G |
| Standard capacitor instead of an X2 | Risk of fire or shock | Always the same safety class |



