Current Timestamp (ms):
Unix Timestamp Converter is a free online tool designed for developers and general users. It supports bidirectional conversion between Unix timestamps and human-readable date/time formats, with support for over 200 global timezones to meet the needs of international development and data processing.
A Unix timestamp represents the total number of seconds (or milliseconds) elapsed since the Unix epoch — January 1, 1970, 00:00:00 UTC. Due to its precision and universality, timestamps are widely used in computer systems, database records, log analysis, API parameters, and more.
The following code snippets show how to get the current Unix timestamp in popular programming languages:
| Swift | |
| Go | |
| Java | |
| JavaScript | |
| Objective-C | |
| MySQL | |
| SQLite | |
| Erlang | |
| PHP | |
| Python | |
| Ruby | |
| Shell | |
| Groovy | |
| Lua | |
| .NET/C# | |
| Rust | |
| Kotlin | |
A second-level timestamp (10 digits) has a precision of 1 second, while a millisecond-level timestamp (13 digits) has a precision of 1 millisecond. The tool supports automatic unit detection, or you can switch manually.
The timestamp itself is an absolute global value independent of timezone. The timezone setting only affects how the result is displayed as a local date and time — for example, the same timestamp shows different hours in Beijing (UTC+8) versus New York (UTC-5).
Typically, a 10-digit number is a second-level timestamp, and a 13-digit number is a millisecond-level timestamp. The "Auto" mode in this tool detects the unit based on the number of digits and converts accordingly.

Loading...