ISO 8601 Formatter & Parser
日時をISO 8601形式へ変換し、ISO8601文字列を構成要素とタイムゾーンに分解・検証します。全てブラウザ内で処理。
How to Use
Select 日時から変換 to turn a local date and time into a UTC ISO 8601 string, or ISO文字列を検証 to validate an existing value. The current-time button produces a value such as 2026-07-20T10:30:00.000Z. Parse mode displays each component and the equivalent UTC instant.
ISO 8601 structure
A complete timestamp combines a calendar date, the literal T separator, 24-hour time, optional fractional seconds, and a zone designator. Z means UTC; +09:00 states an offset. Validation requires a zone so the instant is not ambiguous.
JavaScript Date.toISOString()
Date.prototype.toISOString() converts an instant to UTC and emits fixed-width milliseconds ending in Z. A datetime-local input has no zone, so this page first interprets it in the device's local timezone.
REST APIs and databases
ISO 8601 suits REST payloads because ordering is unambiguous and offsets travel with values. Database behavior depends on the engine and column type: an instant-aware type may normalize to UTC, while a zone-less timestamp can discard offset semantics. Store an IANA zone separately when daylight-saving history matters.
使い方
「日時から変換」では端末のローカル日時を入力します。「ISO文字列を検証」ではZまたは+09:00などを含む文字列を入力すると、年月日・時分秒・ミリ秒・タイムゾーンを分解表示します。現在時刻ボタンではクリック時点のUTCを即座に生成します。
Z表記とタイムゾーンオフセット
2026-07-20T10:30:00ZのZはUTCです。2026-07-20T19:30:00+09:00は日本標準時で、両者は同じ瞬間です。toISOString()はUTCへ正規化するため、元のオフセット自体は残りません。
検証ロジックと境界値
形式だけでなく、月の日数、うるう年、24時間制の時刻、オフセットの時・分も検証します。2025-02-29や25時は拒否されます。処理系ごとに対応が異なるうるう秒の60は受け付けません。
API・データベース設計
REST APIではUTCへ統一すると比較やログ追跡が容易です。予約時刻など地域の壁時計時刻が重要なら、UTCの瞬間に加えてAsia/TokyoのようなIANAタイムゾーン名を保持してください。timestamp型がオフセットを保存するかは製品と型により異なります。
よくあるエラーと対処 / Common Errors and Fixes
| 症状 / Error | 原因 / Cause | 対処 / Fix |
|---|---|---|
| 形式エラー / Format error | Tやzoneがない / Missing T or zone | 2026-07-20T10:30:00Zの完全形式にする / Add Z or offset |
| 9時間ずれる / Nine-hour shift | JSTがUTCになった / JST normalized to UTC | Timezone Converterで表示地域を変換 / Convert display zone |
| 2月29日が拒否 / Feb 29 rejected | うるう年ではない / Not a leap year | 年または日を修正 / Correct year or day |
| DBでoffsetが消える / Offset lost in DB | 型がzoneを破棄 / Type discarded zone | UTC値とIANA zoneを別に保存 / Store both separately |
言語別コード例 / Code Examples
JavaScript
const date = new Date("2026-07-20T19:30:00+09:00");
if (Number.isNaN(date.getTime())) throw new Error("Invalid date");
console.log(date.toISOString()); // 2026-07-20T10:30:00.000ZPython
from datetime import datetime, timezone
value = "2026-07-20T19:30:00+09:00"
dt = datetime.fromisoformat(value.replace("Z", "+00:00"))
print(dt.astimezone(timezone.utc).isoformat(timespec="milliseconds").replace("+00:00", "Z"))Go
value := "2026-07-20T19:30:00+09:00"
t, err := time.Parse(time.RFC3339, value)
if err != nil { log.Fatal(err) }
fmt.Println(t.UTC().Format("2006-01-02T15:04:05.000Z"))Before / After 実例
| Before(入力) | After(UTC ISO 8601) | 意味 |
|---|---|---|
2026-07-20 19:30(JST端末) | 2026-07-20T10:30:00.000Z | ローカル日時をUTCへ変換 |
2026-07-20T19:30:00+09:00 | 2026-07-20T10:30:00.000Z | オフセットをUTCへ正規化 |
2026-02-30T10:00:00Z | Validation error | 存在しない日付を検出 |
Why browser-only?
Dates can reveal operational schedules, release windows, or customer activity. Formatting and validation run locally in your browser with no external API request, so entered values are not sent to our server.
日時には運用スケジュールや顧客活動などの情報が含まれる場合があります。本ツールはブラウザ内だけで実行し、外部APIを呼び出さないため、入力値は変換のためにサーバーへ送信されません。
関連ツール・ガイド
- Timestamp Converter — ISO日時とUnix timestampを相互変換
- Timezone Converter — IANAタイムゾーン間で日時を変換
- Date Diff Calculator — 2つの日付の差を計算
- Unix Timestamp Guide / Unix Timestamp Conversion — エポック秒とISO 8601の関係
関連ツール / Related Tools
開発をもっと効率的に
PR
レンタルサーバー
エックスサーバー
国内シェアNo.1の高速レンタルサーバー(エックスサーバー社調べ)。WordPressも簡単セットアップ。
詳しく見る →レンタルサーバー
ConoHa WING
国内最速クラスのレンタルサーバー。独自ドメイン永久無料特典付き(特典内容は変更される場合があります)。
詳しく見る →レンタルサーバー
mixhost
高速SSD・HTTP/3対応のクラウド型レンタルサーバー。
詳しく見る →VPS
シンVPS
メモリ単価が国内最安水準・オールNVMe SSD搭載の高性能VPS(大容量メモリプラン利用時)。開発・検証環境の構築に。
詳しく見る →Windows VPS
ConoHa for Windows Server
Windows環境のVPS。リモートデスクトップで開発・検証環境を構築。
詳しく見る →