JSON Formatter
Paste messy or minified JSON and get it back pretty-printed with 2-space indentation. The same step tells you whether the JSON is valid.
Convert a Unix timestamp to a readable date in UTC, your local time and ISO 8601, or turn a date back into Unix seconds and milliseconds.
Updated
Your browser is preparing the tool. It runs 100% locally.
Paste a Unix timestamp and the tool shows the date in UTC, your local time and ISO 8601 format. Pick a date and it gives you the Unix time in seconds and milliseconds. Unix time counts the seconds since 1 January 1970 UTC. The tool reads a value of ten digits or fewer as seconds and a longer one as milliseconds. The conversion happens on your device.
It works in both directions. Type a Unix timestamp and you see three readings of it: the UTC date and time, the same moment in your device's timezone, and the ISO 8601 string. That makes an epoch value from a log or an API easy to read. Pick a date and time and you get the matching Unix value in seconds and in milliseconds.
A current-time button fills in the present moment, handy when you need a timestamp for code or a test. Everything updates as you type.
Unix time is the number of seconds since the epoch, midnight UTC on 1 January 1970, so the tool turns a timestamp into a date by counting that many seconds forward. It decides the unit by length. Ten digits or fewer is read as seconds, and anything longer as milliseconds, because millisecond values are three digits longer and seconds values only recently reached ten digits.
The UTC reading is the unambiguous one. The local reading applies your device's timezone offset to the same instant, and the ISO 8601 string is the standard machine-readable form. Going the other way, a chosen date comes out as whole seconds (rounded down) and as milliseconds.
Unix time = seconds since 1970-01-01 00:00:00 UTC (leap seconds ignored)
ten digits → seconds · thirteen digits → milliseconds1700000000 → Tue, 14 Nov 2023 22:13:20 UTCThe tool reads ten digits or fewer as seconds and longer values as milliseconds.
| Epoch | 1 January 1970, 00:00:00 UTC |
|---|---|
| Timestamp to date | UTC, local, ISO 8601 |
| Date to timestamp | seconds and milliseconds |
| Unit detection | ten digits or fewer is seconds, longer is milliseconds |
| Local time | uses your device timezone |
| Leap seconds | ignored (as in Unix time) |
| Where it runs | On your device; nothing is sent |
It tells seconds from milliseconds by the number of digits: ten or fewer means seconds. That's right for almost every timestamp in use today, but an odd value can fool it. A milliseconds value from the early 1970s has few digits and would be read as seconds, and a seconds value after the year 2286 has eleven digits and would be read as milliseconds.
The local reading depends on your device's timezone and clock, so the same instant shows a different wall-clock time on a machine set to another zone. The UTC and ISO readings are identical everywhere.
Unix time ignores leap seconds by definition. It counts as if every day had exactly 86,400 seconds, so it can drift a few seconds from strict astronomical time. That's intended, and every system that uses Unix time does the same.
The tool runs on the browser's 64-bit dates, so the Year 2038 problem doesn't affect it. That bug hits systems that store Unix time in a signed 32-bit integer, which overflows in January 2038. Browsers handle dates far beyond that.
Whole seconds are rounded down. A date with a fractional second is truncated, so the seconds value is the floor of the exact time.
Turn an epoch value in a log line into a readable date.
Decode timestamps returned by an API into UTC and local time.
Grab the current Unix time in seconds or milliseconds for a test or config.
See the same instant in UTC and your local time at once.
Need the gap between two dates? Use a date-difference calculator. For converting between named time zones, not just UTC and local, a world-clock or timezone tool does the job, and durations belong in a time-duration calculator.
The tool counts seconds from the 1 January 1970 UTC epoch and treats ten digits or fewer as seconds, longer values as milliseconds. Leap seconds are ignored, as in all Unix time. The local reading follows your device's timezone, and 64-bit browser dates keep it clear of the 32-bit Year 2038 bug.
Paste messy or minified JSON and get it back pretty-printed with 2-space indentation. The same step tells you whether the JSON is valid.
Encode any text to standard Base64 in your browser, emoji and accented letters included.
Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text at once, updated as you type, with a plain note on which ones are still safe for security work.
Generate up to 500 random version 4 UUIDs at once, the 128-bit identifiers used for database keys, from your browser's secure random generator.
Decode Base64 back to readable text in your browser, Unicode included, and get a plain error message when the input is broken.
Percent-encode a value so it can sit safely inside a URL. Spaces, ampersands, slashes and other special characters become %-codes, using the browser's encodeURIComponent.
Paste or pick your input at the top of the page. The conversion runs on this device and needs no account.