Home › Developer Tools › REM to PX Converter

REM to PX Converter

Convert CSS rem units to pixels. Enter one or several rem values and your root font size (16px by default) to get pixels, points and a ready-to-paste CSS line, plus a quick table from 0.125rem to 6rem.

Last updated:

rem

One value, or several separated by spaces or commas (e.g. 0.75 1 1.25 2).

px

The html element's font size. Browser default: 16px.

Enter your values to see the result.
Advertisement
Advertisement

How to use the REM to PX Converter

  1. Enter a rem value, or several separated by spaces or commas.
  2. Set the root font size of your page: 16px unless your CSS changes the html font size.
  3. Read the pixels plus points and percent.
  4. Copy the CSS or use the quick table for common sizes.
  5. Need the reverse? Use the PX to REM converter linked below the result.

REM to PX formula

px = rem × root font size and, the other way, rem = px ÷ root font size. The root font size is the computed font-size of the <html> element, 16px by default.

Examples at a 16px root: 0.5rem = 8px, 1.25rem = 20px, 2rem = 32px. At a 10px root (html { font-size: 62.5% }): 1.4rem = 14px, 2.4rem = 24px.

Common REM sizes

REMPX (16px root)PX (10px root)Typical use
0.75rem12px7.5pxSmall print, captions
0.875rem14px8.75pxSecondary text, buttons
1rem16px10pxBody text
1.125rem18px11.25pxLarge body text
1.25rem20px12.5pxh5 / lead text
1.5rem24px15pxh4
2rem32px20pxh2 / h1 on mobile
3rem48px30pxHero headings

Media queries in rem or em use the browser's default font size (usually 16px), not the html font size you set in CSS.

Frequently asked questions

How do I convert rem to px?

Multiply the rem value by the root font size: px = rem × root. With the default 16px root, 1.5rem = 1.5 × 16 = 24px and 0.875rem = 14px.

How many pixels is 1rem?

1rem equals the font size of the root html element. In every major browser that is 16px by default, unless the page's CSS or the user's browser settings change it.

What is the 62.5% trick?

Setting html { font-size: 62.5%; } makes the root 10px (62.5% of 16px), so 1.6rem = 16px and conversions are easy. It still respects users who raise their default font size, because it is a percentage.

What is the difference between rem and em?

rem is relative to the root html font size, so it is the same everywhere on the page. em is relative to the font size of the current element (or its parent for font-size), so nested em values compound.

Why use rem instead of px?

Sizes in rem scale with the user's browser font-size setting, which helps accessibility. Pixel font sizes ignore that setting in most browsers, although page zoom still scales both.

How do Tailwind spacing units map to px?

In Tailwind CSS, one spacing unit is 0.25rem, which is 4px at the default 16px root. So p-4 = 1rem = 16px and text-sm = 0.875rem = 14px.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

PX to REM ConverterConvert px to rem or em and back, with a 1-100px table and a whole-CSS converter.PT to PXConvert points to pixels (pt to px) instantly, with formula and chart.PX to PTConvert pixels to points (px to pt) instantly, with formula and chart.PX to MMConvert pixels to millimeters (px to mm) instantly, with formula and chart.JSON to Excel ConverterTurn JSON into a styled .xlsx spreadsheet; nested arrays become their own linked sheets.JSON to CSVConvert JSON data to CSV for spreadsheets.CSV to JSONConvert CSV data to JSON with live preview.Excel to CSVConvert XLSX spreadsheets to CSV.CSV ViewerOpen a CSV or TSV file as a sortable, filterable table.Excel Viewer (XLSX / XLS)Open XLSX, XLS and ODS spreadsheets in your browser without Excel.Line Ending ConverterConvert text and files between CRLF, LF and CR line endings.Markdown to HTMLConvert Markdown to clean HTML with a live editor.XML to JSONConvert XML to JSON with validation.Text Encoding ConverterDetect and convert text file encodings like UTF-8, UTF-16 and Latin-1.JSON ViewerExplore JSON as a collapsible tree, search keys and values and copy any node's path.TTF to WOFF2 ConverterConvert TTF and OTF fonts to WOFF2 or WOFF and get a ready @font-face CSS snippet.Chmod CalculatorConvert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation.JSON to TypeScriptGenerate TypeScript interfaces or types from JSON, with nested types and optional fields.Morse Code TranslatorTranslate text to Morse code and back, then play it as sound or a blinking light, or save a WAV.HTML Table GeneratorBuild HTML tables in an editable grid with styles, header rows, CSV import and live preview.Hex to Text ConverterConvert hex to text and text to hex with UTF-8 support and space, 0x, \x or comma formats.JSON to XML ConverterConvert JSON to well-formed XML with attributes, arrays and pretty print.JSON to YAML ConverterConvert JSON to clean YAML as you type, with indent, quoting and sort options.YAML to JSON ConverterConvert YAML to pretty or minified JSON, with errors pinned to the exact line.HTML to Markdown ConverterTurn HTML or pasted rich text into clean Markdown with tables and live preview.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.JSON ValidatorCheck JSON with the exact line and column of each error, fix tips and one-click auto-fix.Image to Base64Convert images to Base64 data URIs, CSS backgrounds and HTML img tags in your browser.Base64 to ImagePaste a Base64 string or data URI to preview, identify and download the image.JSON CompareCompare two JSON documents and see every added, removed and changed path.Hex to DecimalConvert hex to decimal instantly with steps and signed mode.Decimal to HexConvert decimal to hex instantly with steps and signed mode.Binary to DecimalConvert binary to decimal instantly with steps and signed mode.Decimal to BinaryConvert decimal to binary instantly with steps and signed mode.Two's Complement CalculatorDecimal to two's complement binary and back for 4-64 bits, with invert-and-add-1 steps.XML to CSV ConverterConvert XML to CSV: detects repeating records, flattens nested data, pick your columns.CSV to XML ConverterConvert CSV to well-formed XML with custom root and row names, escaping and pretty print.TOML to JSON ConverterConvert TOML to JSON and JSON to TOML with a full v1.0 parser and clear error lines.TSV to CSV ConverterConvert TSV to CSV and back, or between tab, comma, semicolon and pipe, with correct quoting.TypeScript to JavaScriptConvert TypeScript or TSX to clean JavaScript instantly: strip types, keep or compile JSX.XML to YAML ConverterConvert XML to clean YAML with attributes, text nodes, lists and exact error lines.YAML to XML ConverterConvert YAML to pretty, well-formed XML with custom root, attributes and array item tags.Boolean Algebra SimplifierSimplify boolean expressions or minterm lists to minimal SOP and POS with Quine-McCluskey steps.Compare Excel FilesCompare two Excel spreadsheets cell by cell, highlight changes and export a diff report.CSV CleanerClean messy CSV in one click: trim spaces, drop empty rows and columns, fix headers, dedupe.CSV VLOOKUP ToolJoin two CSV or Excel files on a key column like VLOOKUP, with left, inner and full joins.Remove Duplicates in ExcelFind and remove or highlight duplicate rows in XLSX or CSV files by the columns you choose.GeoJSON ViewerView GeoJSON on a map, inspect and edit properties, validate against RFC 7946 and export.GPX ViewerOpen GPX tracks on a map with distance, elevation profile, moving time, speed and splits.JSON Repair ToolFix broken JSON automatically: trailing commas, quotes, comments, truncated data, with a diff.Karnaugh Map SolverSolve 2–6 variable K-maps: click cells or enter minterms to get the minimal SOP or POS with groups.Merge Excel FilesCombine XLSX, XLS and CSV files into one workbook or append all rows into a single sheet.Parquet File ViewerOpen Apache Parquet files in your browser: schema, rows, filters and CSV or JSON export.Query CSV with SQLRun SQL on CSV, Excel, JSON and Parquet files in your browser with DuckDB. Join and export.Online Serial MonitorTalk to Arduino, ESP32 and USB serial devices in your browser: log, send, plot and save.Split Excel FileSplit an Excel sheet into several files by row count or by each value in a column, as ZIP.SQL Create Table GeneratorDefine columns, keys, defaults and indexes; get CREATE TABLE SQL for MySQL, Postgres and more.SQL IN Clause GeneratorTurn a pasted list into a SQL IN ('a','b') clause with quoting, dedupe and 1,000-item chunks.SQL Online CompilerRun SQL queries online on SQLite with sample databases, a result grid, CSV export and .db save.SQL to ER DiagramPaste CREATE TABLE statements and get an entity-relationship diagram with keys and links.XML to XSD GeneratorGenerate an XML Schema (XSD) from sample XML: types, occurrences, attributes and namespaces.XML ValidatorCheck if XML is well-formed, see the exact line and column of each error and pretty-print it.Wildcard Mask CalculatorConvert a subnet mask or CIDR to a wildcard mask for ACLs and OSPF, with range and binary.CSV to VCF ConverterConvert a contacts CSV into a vCard (.vcf) file, mapping columns to name, phone, email and more.CSV to YAML ConverterConvert CSV rows to a YAML list of mappings with type inference and delimiter detection.Endianness ConverterSwap byte order of 16, 32 and 64-bit hex values and see big- and little-endian integers and floats.Excel to SQL ConverterTurn an Excel sheet into CREATE TABLE and INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server.Excel to VCF ConverterTurn an Excel contact list into a vCard .vcf file for iPhone, Android, Google or Outlook.
See all 129 Data & File Format Converters →