🚄 12306 Train Tickets: The MRZ Name Hack

Plain English

12306 needs your name in MRZ-style format. Register early, pass real-name checks, then book in the open window.

Prefer the browser MRZ name tool (same rules as passport_mrz_converter.py). Do not mix formats on repeated submissions.

Scope: national

我要买高铁票
wǒ yào mǎi gāotiě piào
I want to buy a high-speed train ticket.

TL;DR: Build the name as SURNAME<<GIVENNAMES (ALL CAPS) with the MRZ tool. Register 2–3 days before travel. Use the manual passport lane at the station.

Prerequisites:


📋 The Runbook

1. The Name String Protocol (single source of truth)

Canonical format (use this first):

  1. Open mrz-tool.html (or python scripts/passport_mrz_converter.py Given Surname).
  2. Enter given name(s) and surname as on the passport.
  3. Copy the result: SURNAME<<GIVENNAMES — uppercase ASCII, accents stripped, hyphens/spaces inside names removed (e.g. Mary-JaneMARYJANE, JoséJOSE).
  4. In 12306:
    • If there is a single full-name field → paste the tool output as-is.
    • If the UI splits Surname / Given name → fill the two boxes from your passport; do not also paste << into both boxes.
  5. Long names: some backends effectively care most about the first ~15 letters of the surname+given block. Include the full legal string until the field stops accepting input; do not invent a shortened legal name.

Do not mix formats: pick tool output or the split fields for one registration attempt. Resubmitting alternating SMITH<<JOHN and SMITH JOHN can prolong “Verifying” failures.

Verification: Status must change from “Verifying” to “Verified” (often ~24h).

2. The Boarding Procedure


🚨 Fallback (Plan B)

If 12306 hangs or rejects payment:

  1. Trip.com: Their international payment gateway is 10x more stable. Pay the $2 fee for the sanity of a verified booking.
  2. “Verify at Station”: If the app says “Manual Verification Required,” you must go to a physical ticket window with your passport before you can buy online.
  3. The Electronic ID Hack: If you lose your physical passport, go to the station police office for a “Temporary Travel Document.” It takes 15 minutes and allows you to travel for 24h.

💡 TechDad’s Tips


🚩 Strategic Gap: The “SPOF” Warning

Single Point of Failure: Relying on the 12306 automated gates.


Last Updated: Jul 21, 2026 Author: TechDadShanghai

← Back to Guide Library