- LuzineDebug
- Tools
- Timestamp converter
Unix timestamp to date converter (and back)
Converts a Unix timestamp (seconds, milliseconds, microseconds) to a readable date in any time zone, and back. Everything happens in your browser.
Get the current timestamp in each language
date +%s # bash php -r 'echo time();' # PHP python3 -c 'import time; print(int(time.time()))' Math.floor(Date.now() / 1000) // JavaScript SELECT UNIX_TIMESTAMP(); -- MySQL SELECT EXTRACT(EPOCH FROM now()); -- PostgreSQL
To read a timestamp back: date -d @1767225600 (Linux), date -r 1767225600 (macOS), new Date(1767225600 * 1000) (JavaScript), Carbon::createFromTimestamp(1767225600) (Laravel).
Frequently asked questions
My timestamp gives a date in 1970 or in the year 50000: why?
Seconds vs milliseconds mix-up. Unix, PHP (time()), Python (time.time()) and most APIs count in seconds (10 digits); JavaScript (Date.now()) and Java (System.currentTimeMillis()) in milliseconds (13 digits). The tool detects the unit from the number of digits.
Does a Unix timestamp depend on the time zone?
No: it counts seconds since 1 January 1970 at 00:00 UTC and is the same everywhere. Only the display changes with the time zone. Store timestamps or UTC dates, convert when displaying.
What is the year 2038 problem?
A timestamp stored in a signed 32-bit integer overflows on 19 January 2038 at 03:14:07 UTC (2147483647). Use 64-bit integers (BIGINT, DATETIME, 64-bit TIMESTAMP) for far-off dates.
Errors this tool helps solve
Other tools
Error finder
Paste an error message or a log: the tool recognises the error and opens the right fix.
JSON validator
Validate, format and minify JSON, with the exact line and column of the error.
Regex tester
Test a regular expression live: highlighted matches, groups, replacement.
JWT decoder
Decode a JWT: header, payload, readable expiry dates and whether the token has expired.
HTTP status codes
All the common HTTP codes (401, 403, 404, 419, 429, 500, 502…): meaning, causes and what to do.
Text diff
Compare two versions line by line: additions, deletions, invisible whitespace.
Base64 & URL encoder
Encode and decode Base64 (standard and URL-safe), URL, HTML entities and Unicode escapes, with proper UTF-8 handling.
Hash generator
Computes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and HMAC of a text or file, and compares with an expected hash.
Cron explainer
Turns a cron expression into a plain sentence, lists the next runs and flags the traps (day of month AND day of week, time zone).
YAML validator
Validates YAML (docker-compose, GitHub Actions, Kubernetes), shows the faulty line and tabs, and converts it to JSON.
Chmod calculator
Tick the permissions and get 755 or rwxr-xr-x (and back), with the ready-to-copy command and safe presets by use case.
cURL converter
Paste a cURL command (DevTools “Copy as cURL”): get the fetch, axios, Node, PHP (Laravel Http or curl) or Python requests code.
Stack trace formatter
Formats a stack trace (JS, Python, PHP, Java, .NET, Go), separates your code from libraries and points to the line to open first.