Unix Timestamp Validator
Check whether a value is a valid Unix timestamp and see exactly why, if it is not.
What counts as a valid Unix timestamp
A valid Unix timestamp is a whole number (an optional decimal fraction is also accepted) that, once interpreted as seconds or milliseconds, falls within the supported calendar range of the years 1 to 9999. This tool checks the format first, then the range, and tells you which check failed instead of a generic error.
Why validation catches real bugs
The most common mistake is mixing up seconds and milliseconds, which does not always cause an obvious crash; it can silently produce a date decades in the wrong direction. This tool flags that case directly, so a value that is technically valid but suspicious (for example, a 13-digit value forced into a seconds field) is called out in the notes.
Want the background? Read our comprehensive guide: Seconds vs Milliseconds Timestamps.
How to use this tool
- Enter the value you want to check.
- Choose the unit, or leave it on Auto to have it detected.
- Select Validate.
- Read the Valid or Invalid result, the reason if it is invalid, and any notes about the value.
Examples
A valid value and an invalid one, with the exact reason shown for each.
A valid timestamp
1790000000 (seconds)
- Result
- Valid Unix timestamp in seconds.
Not a number
hello world
- Result
- "hello world" is not a Unix timestamp. A timestamp contains only digits, with an optional minus sign and an optional decimal point.
A negative timestamp
-86400 (seconds)
- Result
- Valid Unix timestamp in seconds.
Frequently Asked Questions
What makes a timestamp invalid?
Can negative numbers be valid?
How does the validator choose seconds or milliseconds?
Does this check leap seconds?
Related tools
- Unix Timestamp ConverterTurn a Unix timestamp into UTC, local time and ISO 8601.
- Unix Timestamp Batch ConverterConvert a whole list of Unix timestamps at once, with CSV export.
- Epoch ConverterSee epoch seconds and milliseconds side by side, with UTC and local time.
- Milliseconds to DateConvert Unix milliseconds, such as Date.now() values, to a date.