MPSZ format for representing mahjong tiles

The MPSZ format is a notation for writing down mahjong tiles, such as a hand, using only digits and the four letters m, p, s and z. Because it can be typed on any keyboard and needs no special fonts or images, it is widely used on social media, in blogs and as input for mahjong tools.

For example, the following hand is written as 123m456p789s11z in MPSZ format.

🀇🀈🀉🀜🀝🀞🀖🀗🀘🀀🀀

Basic rules

A tile is a digit followed by a suit letter

Each tile is written as a digit followed by a letter that indicates its suit.

LetterSuitDigitsExample
mCharacters (Manzu)1–91m = 🀇
pDots (Pinzu)1–91p = 🀙
sBamboo (Souzu)1–91s = 🀐
zHonors (Jihai)1–71z = 🀀 (East)

For honors, 1z to 7z stand for East, South, West, North, White, Green and Red, in that order.

Consecutive tiles of the same suit share one letter

When several tiles of the same suit come in a row, write only their digits and put the letter once at the end.

  • 1m2m3m → 123m
  • 1m2m3m4p4p → 123m44p

Each digit belongs to the suit of the next letter that follows it, so 123m44p means "1, 2 and 3 of characters, and 4 and 4 of dots".

Red fives are written as 0

A red five (aka dora) is written with 0 instead of 5.

  • 0m = 🀋 (red five of characters)
  • 0p = 🀝 (red five of dots)
  • 0s = 🀔 (red five of bamboo)

Extended notation

The following notation is available in some tools, such as Mahjong Tile Converter. Note that not every tool supports it.

NotationMeaningExample
r + tileRed tile (same as 0)r5m = 🀋
-Back of a tile- = 🀫

List of tiles

Letter1234567890 (red)
m🀇🀈🀉🀊🀋🀌🀍🀎🀏🀋
p🀙🀚🀛🀜🀝🀞🀟🀠🀡🀝
s🀐🀑🀒🀓🀔🀕🀖🀗🀘🀔
z🀀East🀁South🀂West🀃North🀆White🀅Green🀄︎Red

Tools for converting MPSZ format into tiles

Mahjong Tile Converter

A macOS menu bar app that converts a hand written in MPSZ format into Unicode mahjong tile characters. Since the result is plain text, you can copy and paste it straight into social media or notes. You can also check your conversion history and convert from notations other than MPSZ.

[Mahjong] Creating a program to restore MPSZ format tile symbols to tile form using Javascript (Japanese)

An article that introduces a web application for displaying graphical tiles from MPSZ format, and explains how it was built.


Contribution

If you would like to make a donation, please click here. The money you donate will be used to improve my programming skills and maintain the application.