If you come to shogi from chess, the first surprise is not the rules. It is the game record. Instead of PGN you get a .kif file, often full of characters your text editor renders as garbage, and no obvious way to tell which side moved what.
This guide walks through a real KIF file line by line, then explains the three other formats you will meet (KI2, CSA, JKF). It stays on the practical side — what is in the file and how to read it. The conceptual side (coordinates as a system, USI, SFEN, pieces in hand) is covered in a companion article for chess players.
First: why the file looks broken
Many KIF files are saved in Shift_JIS, an older Japanese encoding, rather than UTF-8. Open one in an editor that assumes UTF-8 and you see mojibake. The file is fine; the editor guessed wrong.
A robust reader tries UTF-8 first and, if the bytes are not valid UTF-8, falls back to Shift_JIS. That is exactly what the shogi notation engine in Ponder (our chess and shogi study board) does when it decodes an uploaded file:
try {
return new TextDecoder('utf-8', { fatal: true }).decode(buf);
} catch {
return new TextDecoder('shift_jis').decode(buf);
}
If you only want to read the file yourself, tell your editor to reopen it as Shift_JIS and the text appears.
The header
A KIF file starts with a few key:value lines. Note the full-width colon. Here is the top of a sample record:
先手:先手(サンプル)
後手:後手(サンプル)
棋戦:chesswhy サンプル棋譜
戦型:横歩取り
手合割:平手
The keys you will actually use:
| Key | Meaning | Chess equivalent |
|---|---|---|
| 先手 | Sente — the player who moves first | White (in the sense of moving first) |
| 後手 | Gote — the player who moves second | Black |
| 棋戦 | Event / tournament | [Event] |
| 戦型 | Opening or strategy name | — |
| 対局日 | Date | [Date] |
| 手合割 | Handicap. 平手 means an even game | — |
One thing to unlearn: in shogi, Sente is the side that moves first, and in English writing Sente is often called "Black". So "Black moves first" is correct in shogi. Our engine labels the sides as Sente (Black) and Gote (White) to keep both names visible.
The move list
After a separator line comes the move list. Each line is one half-move:
手数----指手---------消費時間--
1 7六歩(77) ( 0:00/00:00:00)
2 3四歩(33) ( 0:00/00:00:00)
3 2六歩(27) ( 0:00/00:00:00)
Read 1 7六歩(77) as:
1— the move number. In KIF every half-move gets its own number. Move 1 is Sente's first move, move 2 is Gote's reply. There is no "1. e4 e5" pairing as in PGN. This makes the record's move number and the ply count the same thing, which is convenient once you get used to it.7六— the destination square: file 7, rank 6. Files are numbered 1–9 from right to left as seen from Sente, and ranks 一–九 (1–9) from top to bottom. The file is usually written with a full-width Arabic numeral and the rank with a kanji numeral.歩— the piece that moved: a pawn.(77)— the square it came from: file 7, rank 7. This is what lets a reader reconstruct the move without a board.( 0:00/00:00:00)— time spent on this move and total time. Safe to ignore when reading.
So move 1 is "the pawn on 7-7 advances to 7-6", the shogi equivalent of opening the bishop's diagonal.
The four symbols that trip people up
Most of the move list is square + piece + (origin). Four extra symbols carry meaning:
同 (same). 同 歩(23) means "pawn captures on the same square as the previous move". Instead of repeating the coordinates, KIF writes 同. Look at the line above it to find the square. In the sample, move 9 is 2四歩(25), and move 10 is 同 歩(23): Gote's pawn from 2-3 captures on 2-4.
成 (promotes). 3三角成(88) means the bishop from 8-8 moves to 3-3 and promotes. Promotion in shogi is optional in most cases, so KIF has to say when it happened.
不成 (does not promote). The opposite: the piece could have promoted but the player declined. You will see this less often, but it matters.
打 (drop). 5五角打 means a bishop is dropped from hand onto 5-5. There is no origin square because the piece was not on the board — it was captured earlier and is being put back into play for the dropping side. Drops are the rule that makes shogi feel so different from chess, and 打 is how the record marks them.
Put together, a short stretch of the sample reads:
27 3三角成(88) — Sente's bishop from 8-8 captures on 3-3 and promotes
28 同 金(32) — Gote's gold from 3-2 recaptures on 3-3
29 5五角打 — Sente drops a bishop on 5-5
30 8二飛(84) — Gote's rook retreats from 8-4 to 8-2
KI2, CSA and JKF
You will meet three related formats. Our engine detects which one a file is and reads all four.
- KI2 is KIF without the origin squares and without the move numbers, written as a running text of moves like
▲7六歩 △3四歩. The triangles mark the side (▲ Sente, △ Gote). It is compact and readable, but ambiguous moves need extra disambiguation characters, so it is harder to parse. - CSA is a machine-oriented format used by computer shogi. Moves look like
+7776FU: side, origin, destination, piece code. No kanji, easy to generate, hard to read by eye. - JKF is a JSON representation of a game record — the same information as KIF, but structured for programs.
If you are choosing a format to save your own games, KIF is the safe default: it carries the most information (origin squares, times) and every reader we know of, including ours, accepts it.
What about USI and SFEN?
Under the hood, programs do not pass kanji around. Every KIF move is converted to a coordinate form called USI (7g7f, drops as P*5e, promotion as a trailing +), and positions are stored as SFEN, the shogi counterpart of FEN. Ponder does exactly this when it reads your file, and it is also what an AI-suggested line gets checked against before anything reaches the board. If you know PGN and FEN, the companion article Shogi Notation for Chess Players maps USI and SFEN onto what you already know — including the one field FEN does not have, pieces in hand.
A quick checklist
When a KIF file makes no sense, run through these:
- Reopen it as Shift_JIS if the characters look broken.
- Remember that every half-move has its own number.
- Files run right to left from Sente's side; ranks run top to bottom.
同means "same square as the last move";成promotes;不成declines;打is a drop from hand.- Sente moves first and is often called Black in English.
Once those five things are in place, a KIF file reads almost as easily as a PGN — and you can start asking the more interesting question, which is why each move was played.