Conversion Form

CH
REM

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: chrem

Use ch for width relative to text and rem for global typography scaling.

Quick Reference: Unit Conversion by Tens

CHREM
10ch5rem
20ch10rem
30ch15rem
40ch20rem
50ch25rem
60ch30rem
70ch35rem
80ch40rem
90ch45rem
100ch50rem
110ch55rem
120ch60rem
130ch65rem
140ch70rem
150ch75rem
160ch80rem
170ch85rem
180ch90rem
190ch95rem
200ch100rem
210ch105rem
220ch110rem
230ch115rem
240ch120rem
250ch125rem

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 rem without testing on different screen sizes.

Real Code Example

/* Mobile-first card with ch → rem */
.card {
  padding: 0ch;     /* undefinedrem */
  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