How to Read a Go SGF File: Coordinates, Moves and Comments
Start with the complete existing guide to coordinates, moves, pass values, setup and the record tree.
Choose your file question
Use the question that matches the problem in your record. Check its actual text, point lists and root properties before changing the board or saving a repaired copy.
Use these complete existing guides when the file format or handicap position is unfamiliar.
Start with the complete existing guide to coordinates, moves, pass values, setup and the record tree.
Distinguish handicap metadata from AB setup points and check the intended complete position.
Check a known intended comment before changing encodings or raw escapes.
If an SGF comment looks garbled, check both the CA declaration and the saved bytes. CA tells a reader how to decode text; it does not convert the file. Work from a preserved original and a known intended comment before changing either part.
Inside an SGF comment, escape a literal closing bracket as \] and a literal backslash as \\. A backslash before an actual line break removes that break. These rules concern the SGF value, even when the file’s character encoding is already correct.
Reconstruct complete point sets, then distinguish setup stones from marks.
A compressed SGF point value such as aa:cc selects an inclusive rectangle. Expand it before counting stones or marks: that rectangle contains nine points. Overlapping values can repeat a point, and a one-point rectangle must instead be written as a single point.
TR, SQ, CR and MA mark intersections; LB attaches text to a point. None of those properties supplies a black or white stone. Reconstruct the stones first, then overlay the marks, even when a mark appears at an empty intersection.
Resolve the actual board size and the active view as separate questions.
For Go, an omitted SZ defaults to a 19×19 board in FF4. SZ[9] is a square 9×9 board; SZ[9:13] is a rectangle with nine columns and thirteen rows. SZ belongs in the root node, and a square must use the single-number form.
VW selects which board points are visible; it does not remove the stones outside that view. The selection is inherited by child nodes until a new VW value changes it. An empty VW[] restores visibility to the whole board.
The six file-check guides include original downloadable SGF examples. Deliberately faulty examples are labeled before the download. Compare the raw properties with the stated text or complete point set; keep your own original record unchanged while troubleshooting.
The full-context diagrams and file checks explain the specified SGF behavior. They do not claim a played game, engine evaluation or an import-and-export test in every viewer. For a teaching position, keep the full board, active view and explanatory annotations distinct.
Return to all board-game practical guides for Go rule exercises, Xiangqi positions and other teaching resources.