Backgammon Position Editor & Converter

Set up any backgammon position on the board, or start from an XGID, GNUID, OGID, or .xgp file. Edit it, convert it, and download the board as an image, all in your browser.

Position preview and conversions

XGID

                    
GNUID

                    
OGID

                    

Setting up a backgammon position

The board at the top of this page opens on the starting position, ready to edit. To start from a position you already have, paste its ID anywhere on the page or open its .xgp file from the bar above the board. Editing works like eXtreme Gammon's setup mode, so a whole position takes a few seconds:

  • Checkers: left-click a point for the bottom player, right-click for the top player. Where you click sets the count: the second checker's spot for two, the top of the point for five. Click the fifth checker again to add more.
  • Several points at once: hold the button and drag up or down to adjust a point, or across points to fill them all to the same height.
  • Empty a point: click just below it, on its number. On a touchscreen, Tap adds chooses which player you place.
  • Cube: left-click moves it one step toward the bottom player (centered, then 2, 4, 8…), right-click toward the top player.
  • Dice: set Position to checker play, then left-click a die to raise it or right-click to lower it.
  • Turn, score, and rules: Change Player gives the other side the roll. Choose money or match, then set the match length, both scores, Crawford, Jacoby, and beavers.
  • Keyboard: over a point, 0–9 set the count and +/− add or remove a checker. Del clears the board, Ins sets up the opening position, Ctrl+Z undoes, and Ctrl+Y redoes.

The XGID, GNUID, and OGID update as you edit, ready to paste into eXtreme Gammon, GNU Backgammon, or OpenGammon, and the page address holds the current position for sharing. Download the board as a PNG to use it as a diagram in an article, a forum post, or a flashcard.

Backgammon position IDs explained

A position ID is a short string that describes a whole backgammon position: the checkers, cube, dice, score, and match length. Paste one into analysis software, a forum post, or a flashcard and anyone can load the exact position. The three common formats don't read each other, so this tool reads all three, detects which one you pasted, and converts between them.

XGID (eXtreme Gammon)

An XGID is XGID= followed by ten fields separated by colons. The checker string is always written from the bottom player's side of the board, whoever is on roll.

FieldExampleMeaning
Checkers-b----E-C---eE---c-e----B-26 characters: the top player's bar, points 1 to 24 counted from the bottom player's home board, then the bottom player's bar. - is empty, A–P are 1 to 16 of the bottom player's checkers, a–p the top player's.
Cube value0Power of 2: 0 is 1, 1 is 2, 2 is 4, and so on.
Cube position01: bottom player owns it, 0: centered, −1: top player owns it.
Turn11: bottom player's turn, −1: top player's turn.
Dice31The roll to play, 00 to roll or double, or D, B, R for a pending double, beaver, or raccoon.
Score 10Bottom player's score.
Score 20Top player's score.
Crawford / Jacoby0In a match, 1 marks the Crawford game. In a money game, Jacoby rule plus 2 × beavers allowed (0 to 3).
Match length00 is a money game.
Max cube8Power of 2, so 8 caps the cube at 256.

GNUID (GNU Backgammon)

A GNU Backgammon ID has two parts separated by a colon. The 14-character Position ID holds only the checkers: an 80-bit key that lists, for each player, a 1 for every checker and a 0 after each point, from their ace point round to the 24-point and then the bar. The player not on roll comes first. The key is packed into 10 bytes and written in Base64, and the starting position is always 4HPwATDgc/ABMA.

The 12-character Match ID holds everything else: the cube value and owner, the player on roll, the Crawford flag, the game state, any double or resignation on offer, the dice, the match length (0 for money), and both scores.

OGID (OpenGammon)

An OGID lists every checker as one character: its point number in base 26 (0–9, then a–p), on one numbering for the whole board. White's bar is 0, Black's bar is p (25), and White moves from point 1 toward 24.

After White's and Black's checkers come the cube, the dice, a color, the game state, White's score, Black's score, the match length (with a C suffix in the Crawford game), and a move number. The cube is three characters: the owner (N for centered, W, or B), its value as a power of 2, and its state (N, or O, T, P for offered, taken, passed), so N0N is a centered cube on 1. The color is the player who acted last, so the player to act is the other one.

One position, three IDs

The opening position, with the bottom player to play 3-1 in a money game and the cube centered:

  • XGID: XGID=-b----E-C---eE---c-e----B-:0:0:1:31:0:0:0:0:8
  • GNUID: 4HPwATDgc/ABMA:cIkFAAAAAAAE
  • OGID: 11ccccchhhjjjjj:66666888dddddoo:N0N:31:B:R:0:0:0:0

In the XGID, the first character is the top player's bar, so the seventh character, E, is the bottom player's five checkers on their 6-point, and the second, b, is the top player's two back checkers on the bottom player's ace point. Both players have 167 pips.

Pasting a position into GNU Backgammon or eXtreme Gammon

  • GNU Backgammon: copy the ID and choose Edit → Paste ID (Ctrl+V). It accepts a GNUID or an XGID. To copy the current position, choose Edit → Copy ID to Clipboard → GNUbg ID.
  • eXtreme Gammon: copy the whole XGID, including XGID=, and choose File → Import → Position from Clipboard (Ctrl+V). It accepts a GNUID as well. To copy the current position, choose File → Export → XGID to Clipboard (Shift+Ctrl+C).

Frequently asked questions

Why does the board look flipped compared with another program?

Programs differ in which player sits at the bottom and which way the board runs. The position is the same; use Swap Colors or Swap Direction above to match the layout you're used to.

Can I make a backgammon diagram of my own position?

Yes. Place the checkers, cube, and dice on the board at the top of this page, then choose Download PNG or Copy as Image. Pick one of 7 color schemes and either board direction first. No account or software is needed.

What is an .xgp file?

A single position saved from eXtreme Gammon with File → Export → Position as XGP. The tool reads its checkers, cube, dice or pending cube decision, score, match length, and Crawford status, then shows the position with all three IDs.

Is my file uploaded?

No. Position IDs and .xgp files are read in your browser and never sent to a server.

How do I share a position?

After you convert or edit a position, the page address contains it, so you can send the link. You can also download the board or copy it as a PNG image, 1760 pixels wide.

Which format should I use?

Whichever the other person's software reads: XGID for eXtreme Gammon, GNUID for GNU Backgammon, OGID for OpenGammon. GNU Backgammon accepts XGIDs and eXtreme Gammon accepts GNUIDs, so either works in both.