JSON to Java
Generate Java DTOs and review validation-oriented API models.
Timestamp
Auto-detect second, millisecond, and microsecond Unix values and convert them to ISO 8601, RFC 2822, time-zone aware local strings, and relative time. Paste any numeric or human-readable timestamp and read every representation at once.
Different systems spell time differently. Kafka headers carry milliseconds, databases store microseconds, and frontends almost always want ISO 8601. Staring at an ambiguous number is an easy way to misread a deploy window or a billing event.
This page classifies the input the moment you paste it: 10 digits is seconds, 13 digits is milliseconds, 16 digits is microseconds. Human strings like `Tue, 14 Nov 2023 22:13:20 GMT` go through the JavaScript Date parser and expand into every other format.
1. `Date.now()` returns milliseconds while Python `time.time()` or Go `time.Now().Unix()` returns seconds. Systems that share timestamps must agree on a unit.
2. ISO strings without `Z` or an offset are parsed in the browser's local zone. Always include an offset if the value will cross systems.
3. Microseconds and nanoseconds lose precision in JavaScript Number. Use BigInt or keep them as strings when exact ordering matters.
Q. Does it support future timestamps? Yes, anything inside the Date range (about ±100,000 years).
Q. What about negative timestamps before 1970-01-01? Supported — the ISO output shows the historical date with a minus sign.
Q. Is anything stored server-side? No, everything runs inside your browser.
Jump to other JSON2Class utilities that naturally follow this one.
Generate Java DTOs and review validation-oriented API models.
Review nullability and Kotlin data class structure quickly.
Turn API payloads into TypeScript interfaces for frontend work.
Format sample payloads before sending them back into the converter.