PGN Reformatting Tool
This is a small JavaScript program that you can use to change between different formats in a chess game or database of multiple games. The code utilizes the same framework as the
LT-PGN viewer PGN2FEN tool (which in turn is built upon LT-PGN viewer code), but unlike the original version this page can handle PGN files with multiple games. Furthermore, FEN data can be converted in an expanded form. All of the resulting data is in a tab-delimited format to facilitate export to excel.
To use this tool, simply paste your input text into the field below and choose the appropriate options. Selecting the correct input type is important, as this program can handle various inputs. For example, as part of the processing it will convert PGN files to FEN (hence the use of hte LT-PGN code), but you can bypass this if you already have a bunch of FEN positions. You can choose between different input and output formats, but they must all flow in the same direction (i.e. you cannot input a list of FEN positions and generate PGN's with header information). The specialized input and output formats are as follows:
PGN w/ Line Breaks: This is PGN text, with one or multiple games, with line breaks
within the game score. This does not count line breaks between the game score and header, between different header tags, or between seperate games.
PGN w/o Line Breaks: This is a standard PGN text, with one or multiple games, that can contain Header information, but does not contain line breaks between any of the moves in the game score.
PGN w/o Header: This is PGN text that lacks all header tags and annotations.
FEN: This is standard
Forsyth-Edwards Notation, which describes the entire board position. Consecutive empty spaces along a rank (from A to H file) are denoted by a number.
FEN-X: In this expanded version of FEN notation, empty spaces are not collapsed into a number but each space is denoted by a dash (-) symbol. This format represents the entire board explicitly: there is a character for every square.