Misc Tools
Every Misc Tools tool on Toolz.dev: 2 free utilities that run entirely in your browser. No signup, no uploads, no downloads.
Two tools that do not belong to a larger family, and both answer a question that comes up constantly in software: what time is this number, and give me an identifier nothing else will collide with. The timestamp converter turns Unix time into a readable date and back. The UUID generator produces 128-bit identifiers that need no central authority to stay unique.
They pair more often than their category suggests, because both show up in the same places: a log line with an epoch timestamp and a request id, a database row with a created_at integer and a UUID primary key, an API response with both.
Two identifiers you meet constantly
| Tool | Converts or generates | Watch out for |
|---|---|---|
| Timestamp Converter | Unix time to a date, and back | Seconds versus milliseconds, and time zone |
| UUID Generator | Version 4 UUIDs, singly or in bulk | Unique is not the same as unguessable |
Unix time, and the two ways to misread it
Unix time counts seconds since 1 January 1970 UTC, which makes it a single number with no time zone, no daylight saving and no ambiguity about format. That is exactly why systems store it: comparing two timestamps is comparing two integers. The first way to misread one is the unit. JavaScript works in milliseconds while most of Unix, Python and PostgreSQL work in seconds, so a value that lands in 1970 has been read as seconds when it was milliseconds, and a value in the year 55000 is the reverse.
The second is forgetting the zone. A timestamp is an instant, and the date you display for it depends entirely on the zone you render it in, so the same number is two different calendar days for a user in Los Angeles and one in Tokyo. The timestamp converter shows the conversion both ways so the number and the rendered date sit side by side, and a time zone converter answers the follow-up question of what that instant reads as somewhere else. The famous limit is real but distant for most systems: a signed 32-bit counter overflows on 19 January 2038, which is why 64-bit time is now standard.
What a UUID guarantees, and what it does not
A version 4 UUID is 122 random bits. The uniqueness argument is arithmetic rather than coordination: with that much entropy, the chance of a collision stays negligible until you are generating billions, which is why distributed systems can mint ids on separate machines without asking anything. That property is what makes UUIDs the default primary key in systems that cannot use an auto-incrementing integer.
The property they do not have is unguessability. A UUID is unique, not secret, and nothing in the format prevents someone enumerating or predicting one, particularly from a generator built on a weak random source. So a UUID is a fine correlation id, file name or primary key, and a poor session token, password reset link or capability URL. Use a random string from a password generator there instead. The UUID generator draws its bits from the Web Crypto API, which removes the weakest version of the risk without changing what the format guarantees.
Choosing between id styles
The trade that decides most schema arguments is index behaviour. A sequential integer key appends to a B-tree index and is compact. A random UUID scatters across the index, fragmenting it and costing write throughput on large, busy tables, and it is four times the size of a 32-bit integer in every index that references it. Against that, a UUID can be generated by the client before the row exists, does not leak how many records you have, and never collides when two systems merge.
Where both matter, time-ordered identifiers such as UUID version 7 or ULID are the compromise: random enough not to collide, ordered enough to append. And for anything user-facing, a short opaque id from a purpose-built scheme reads better in a URL than a 36-character UUID. Both tools here run client-side, so timestamps and generated ids never leave your device.
Frequently asked questions
- Is a Unix timestamp in seconds or milliseconds?
- Both conventions are in use, which is the whole problem. Unix, Python and most databases count seconds; JavaScript counts milliseconds. A quick check: a current timestamp in seconds is 10 digits, and in milliseconds it is 13. A date that lands in 1970 means milliseconds were read as seconds.
- Does a Unix timestamp have a time zone?
- No. It counts seconds since 1 January 1970 UTC and represents an instant, not a local time, which is why it is unambiguous to store and compare. The zone enters only when rendering it as a date, and the same timestamp is two different calendar days on opposite sides of the world.
- What happens in 2038?
- A signed 32-bit timestamp overflows on 19 January 2038, wrapping to 1901. Modern systems store 64-bit time and are unaffected for a span longer than the age of the universe, but the bug still lives in embedded devices, old file formats and any database column still declared as a 32-bit integer.
- Can two UUIDs collide?
- In principle, with negligible probability. A version 4 UUID carries 122 random bits, so a collision requires generating on the order of billions before the odds become worth considering. The practical risk is not the mathematics but a weak random source, which is why the generator draws from the Web Crypto API rather than Math.random.
- Can I use a UUID as a security token?
- No. UUIDs are designed to be unique, not unguessable, and the format offers no protection against enumeration. Use a purpose-made random token for session ids, password reset links and anything else where possession of the value grants access.
- Should I use UUIDs or auto-incrementing integers as primary keys?
- Integers are smaller and index better, since sequential values append to a B-tree while random UUIDs scatter and fragment it. UUIDs win when clients must generate ids before insert, when datasets from separate systems get merged, or when a sequential key would leak your record count. Time-ordered ids such as version 7 or ULID are the middle ground.