Conversion Form

CH
EM

About the Unit

CH: The ch unit is a relative typographic unit based on the width of the '0' character of the current font. This unit is especially useful when you want the width of an element to be proportional to the text content, particularly for input fields or text areas. Using ch ensures that the element size adjusts based on the average character width of the current font, providing precise control over text layout. For example, if you set the width of a text input field to 10ch, it will be wide enough to accommodate 10 '0' characters of the font, making it useful for password fields or numeric inputs. The ch unit is less commonly used than other relative units like em or rem, but it is an excellent choice when precise width based on textual content is needed.

Pro Tip: chem

Ch is useful for text-based width units and em for relative text sizes.

Quick Reference: Unit Conversion by Tens

CHEM
10ch5em
20ch10em
30ch15em
40ch20em
50ch25em
60ch30em
70ch35em
80ch40em
90ch45em
100ch50em
110ch55em
120ch60em
130ch65em
140ch70em
150ch75em
160ch80em
170ch85em
180ch90em
190ch95em
200ch100em
210ch105em
220ch110em
230ch115em
240ch120em
250ch125em

Live Unit Preview

See how different CSS units affect the size of the box below:

10px

10rem

10em

10%

10vw

10vh

Common Mistake

Be cautious when mixing ch and em without testing on different screen sizes.

Real Code Example

/* Mobile-first card with ch → em */
.card {
  padding: 0ch;     /* undefinedem */
  font-size: 1.5rem;
  width: min(90vw, 40ch);
}
Unidade não encontrada.

Keyboard Shortcuts

  • Ctrl + C: Convert
  • Ctrl + I: Invert units
  • Esc: Reset values

More popular conversions