Practical guide
SGF Board Size: Default 19, Square SZ and Rectangles
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.
Resolve the board before translating its points
The same raw point can be in bounds on one board and outside another. Read SZ before drawing setup stones, replaying moves or deciding where a corner lies. For Go, FF4 states a default of 19×19 when SZ is omitted. [1] [2]
SZ is a root property. It supplies the dimensions for the game tree; a later node is not a valid place to resize that board. Different games in an SGF collection can have different sizes, so resolve each game’s own root rather than carrying the first game’s dimensions into the next. [1] [2]
Preserve the original record when troubleshooting. A viewer’s preferred board setting is not a substitute for the size encoded, or defaulted, in the SGF being read.
Compare an omitted size with an explicit square
(;FF[4]GM[1]CA[UTF-8]C[Original empty Go record with no SZ.])
(;FF[4]GM[1]CA[UTF-8]SZ[9]C[Original empty9x9 record.])These are two separate original teaching records, displayed together for comparison. The first has no SZ and therefore uses the Go default of 19 columns and 19 rows. The second explicitly uses nine columns and nine rows. Neither contains any stones.
Download the omitted-size Go example. Keep your own record unchanged; these are original teaching examples.
Download the explicit 9×9 example. Keep your own record unchanged; these are original teaching examples.
A single number is the square form. Do not infer a 9×9 size merely because a diagram shows only a few corner lines or because all the played points happen to fit inside nine columns. Check the root and whether a VW view is hiding part of a larger board.
A rectangle gives columns first, rows second
(;FF[4]GM[1]CA[UTF-8]SZ[9:13]AB[im])SZ[9:13] describes nine columns and thirteen rows: 9 × 13 = 117 intersections. In lowercase SGF coordinates, the columns run a through i and the rows run a through m. The point im is therefore the lower-right intersection, not an out-of-bounds point on a nine-row square.
Download the 9-column, 13-row rectangle. Keep your own record unchanged; these are original teaching examples.
The first point letter always chooses a column and the second chooses a row in the Go FF4 coordinate definition. [3] Here i is the ninth column and m is the thirteenth row. Swapping the size numbers changes the board: SZ[13:9] would be thirteen columns and nine rows. [1]
Check syntax and property meaning separately
On a narrow screen, scroll the comparison sideways. Keyboard users can focus the table and use the arrow keys.
| Record feature | FF4 meaning or problem | Next check |
|---|---|---|
| No SZ in a Go root | Default 19×19 | Use that default when checking points |
| Root SZ[9] | Square 9×9 | Both axes have nine intersections |
| Root SZ[9:13] | 9 columns, 13 rows | Check each point against its own axis |
| Root SZ[9:9] | Invalid square in composed form | A square must use SZ[9] |
| Child SZ[9] after root SZ[19] | Invalid nonroot SZ | Do not interpret this as a valid resizing move |
A bracket parser can read the text 9:9 or encounter SZ in a child node without proving that these properties obey FF4. This is why a structural parsing result and a size-semantics check must be reported separately.
The specification permits sizes starting at 1×1 and gives Go a maximum of 52×52. That format range is not a guarantee that a particular editor, teaching tool or ruleset supports every size. [2]
Two intentionally faulty size records
(;FF[4]GM[1]CA[UTF-8]SZ[9:9])
(;FF[4]GM[1]SZ[19];SZ[9])Deliberately faulty diagnostic file: Download the intentionally invalid square composed form. Keep your own record unchanged; these are original teaching examples.
Deliberately faulty diagnostic file: Download the intentionally nonroot size property. Keep your own record unchanged; these are original teaching examples.
The first diagnostic uses a square as a pair of equal numbers. FF4 requires the single-number square form. The second gives the root size as 19 and tries to supply another SZ in a child; root properties belong in the root, not later nodes.
If correcting an unknown record, find out what board the author intended before deleting properties or changing dimensions. Existing points, diagrams and trusted original exports can help establish that intent. A correction that makes the file parse but moves stones onto a different board is not a faithful recovery.
For our deliberately authored diagnostics, the intended correction is known: use SZ[9] for the square, and keep the second example’s root SZ[19] without the child SZ. These are examples, not a universal recovery policy.
Two size decisions
The file has GM[1] and no SZ. Should I use my viewer’s last 9×9 setting?
Use the Go FF4 default of 19×19 when interpreting this record.
An omitted SZ is not a request to reuse an application preference. Inspect the actual root and any view selection. The original omitted-size sample contains no stones, so there is no smaller-board evidence to override or repair here.
SZ[9:13] contains AB[im]. Is m too far down for a nine-row board?
This record has thirteen rows, so im is the lower-right point.
The first size number is columns and the second is rows. i fits the ninth column and m fits the thirteenth row. Reversing the numbers or assuming a square would give the wrong boundary check. The complete example has black im, no white stones and every other point empty.
Finish with dimensions, bounds and display support
- Select the game tree you intend to read and find its actual root.
- Read a valid SZ there, or apply the Go default when it is omitted.
- Resolve columns and rows separately; use one number for a square.
- Check all relevant setup points and move coordinates against those bounds. Handle pass values under the Go format rules rather than treating every value as a point.
- Compare the saved record with the viewer’s supported board shapes and displayed result. Preserve an unsupported but correctly specified original rather than silently converting it.
These five original files were checked with the low-level sgfmill 1.1.1 grammar parser; size meaning, root placement and the rectangle’s exact bounds were checked separately. The library’s square-board convenience API was not used as proof of rectangular viewer support.
For coordinate and pass conventions, read the existing SGF coordinates and moves guide. For partial visibility on a correctly sized board, check VW rather than changing SZ.
Sources and further reading
- SGF FF4: file format specificationText escaping, property scope and compressed point-list rules.
- SGF FF4: SZ propertyRoot board size, square and rectangular forms.
- SGF FF4: Go-specific coordinates and movesColumn-first Go coordinates, pass conventions and move interpretation.