タイムスタンプ変換
Unixタイムスタンプと日付を相互変換。秒・ミリ秒に対応。
タイムスタンプ変換とは
タイムスタンプ変換ツールは、Unixタイムスタンプ(1970年1月1日からの経過秒数またはミリ秒数)と人間が読める日付を相互に変換します。ログやAPIの時刻確認に使われます。
🔒 処理はすべてブラウザ内で完結し、データは送信されません。
このツールの前提
- 処理場所
- このページのブラウザ内(JavaScript / Canvas)
- アップロード
- なし — ファイルは端末の外に出ません
- オフライン
- ページを開いた後は通信不要
Seconds or milliseconds, and the factor is 1000
Unix time counts seconds since 1970-01-01T00:00:00Z. JavaScript's Date.now() counts milliseconds. A value of 1,700,000,000 is a 2023 date in seconds and 1970-01-20 in milliseconds — the two are both plausible-looking numbers, which is why the error survives review.
The reliable check is magnitude: current second-based values are 10 digits, millisecond-based ones are 13. Beyond about 2286 the second-based value reaches 11 digits, and the heuristic needs adjusting — but for anything written today, digit count identifies the unit correctly.
The 2038 problem is still ahead
A signed 32-bit integer of seconds overflows on 2038-01-19T03:14:08Z. Systems storing timestamps that way will wrap to 1901. Most modern stacks use 64-bit, but embedded devices, older databases and some file formats do not, and the failure is a date rather than a crash — so it tends to be noticed late.
Milliseconds overflow a signed 32-bit value back in 1970, which is why millisecond timestamps were always stored wider. If a system's timestamps are 32-bit, assume seconds.
Displaying it correctly
The underlying value has no time zone — it is an instant. Any zone appears only when formatting, and the same instant renders as different dates and times depending on where the reader is. Storing a formatted local time instead of an instant is how a scheduled event drifts by an hour twice a year.
For anything user-facing, store UTC and render in the user's own zone, preferring an explicit zone name over an offset. An offset tells you where the clock was, not which rules applied, so a historical date rendered from a stored offset can be wrong across a DST boundary.
使い方
- 1.タイムスタンプまたは日付を入力
- 2.必要なら変換方向を選択
- 3.変換結果をコピー
他の方法との比較
同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。
| 観点 | このツール | サーバー側の変換サービス | デスクトップアプリ |
|---|---|---|---|
| ファイルの処理場所 | このページのブラウザ内 | ベンダーのサーバー(アップロード後) | 自分の PC(アプリをインストール) |
| アカウント | 不要 | 多くの場合必要(無料枠の制限解除に登録を求める) | 不要(ライセンス認証は必要な場合あり) |
| 無料で扱えるサイズ | サイズ制限なし(回数制限もなし) | 数ファイル/時間、または 5〜10MB 程度で課金 wall | ディスクとメモリ次第 |
| 料金 | 無料。Pro は月 $9(大きいファイルと AI 機能のみ) | サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点) | 買い切り、またはサブスク |
| オフライン | 一度開けば通信不要 | 不可 | 可 |
| 20MB を処理し始めるまで | 待ち時間なし(アップロードが無い) | アップロードが支配的(10Mbps 上りで約 16 秒) | アプリの起動のみ |
| 保証できないこと | 結果の隣に式を表示するので、計算を検算できます | 同じ(変換の原理は変わらない) | 同じ。ただし書式の再現はより忠実な場合がある |
サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。
よくある質問
秒とミリ秒の違いは?
10桁は秒、13桁はミリ秒です。自動で判定します。
タイムゾーンは?
UTCとブラウザのローカル時刻を両方表示します。
日付から変換できますか?
はい。「2026-01-01」のような日付を入力するとタイムスタンプを返します。
この変換で失われるもの
計算ツールは結果だけでなく使用した式も表示します。納得できない結果を、ブラックボックスとして捨てるのではなく、一行ずつ検算できます。