Wolfram Research

Function Repository Resource:

PlayWordle (1.0.0) current version: 1.1.0 »

Source Notebook

Play the popular online word game Wordle

Contributed by: Christopher Stover  |  TheRealCStover


deploys a version of the popular online word game Wordle inside a Manipulate object.


ResourceFunction["PlayWordle"] is based on the popular online word game Wordle.
ResourceFunction["PlayWordle"] uses a default word list that is not related to either the original Wordle game or the resource data object Wordle Word List.
In each game, the user has six guesses to discover the correct word. After each guess, the color of the tiles shows how close your guess was to the correct word. For example:
The letter "i" is in the word and in the correct spot:
The letter "e" is in the word but in the wrong spot:
The letter "u" is not in the word in any spot:
Guesses must be lowercase five-letter words and must consist of words in the Union of the default word list and the resource data object Wordle Word List. Guesses which violate these parameters will generate MessageDialog objects.
In some situations (as described in "Scope" below), the correct word is defined at game's end. This is done internally using WordDefinition.


Basic Examples (6) 

Launch the PlayWordle interface:


To play the game, type your guess into the InputField and click the Submit Guess button:

Doing so gives immediate feedback on your guess:

The goal is to use this feedback to guide subsequent guesses. Subsequent guesses are made by typing new words into the InputField and clicking the Submit Guess button:

Keep guessing until you reach an end result. Some games do not go your way: This happens when you use up all your guesses and fail to find the correct word. When this happens, the correct word is given in Red:

Other games may go better and you may find the correct word within the allotted number of attempts. When this happens, the correct word is given in Darker[Green]:

Scope (3) 

Similarly to the online version, the deployed keyboard within PlayWordle keeps track of your progress in the game:

During a game, you can click the Reset button to clear everything and start over:

If the correct word has definitions available via WordDefinition, they may be viewed by clicking the ? button at the end of a game:

This is also true for unsuccessful games as well:

Possible Issues (2) 

Valid PlayWordle guesses must consist of exactly five letters. Guesses with more or fewer letters will generate a MessageDialog:

Valid PlayWordle guesses must also consist of words appearing in either the default word list or the resource data object Wordle Word List. Guesses which do not appear therein will generate a MessageDialog:

Version History

  • 1.1.0 – 14 March 2022
  • 1.0.0 – 22 February 2022

Related Resources

Author Notes

Online sources suggest that the official Wordle game has a list of words it uses for the game (link) and a separate word list consisting of what it considers "valid guesses" (link).
This source says that the daily puzzle words will never be pulled from the "valid guesses" list, but I have not taken the time to investigate the Wordle source code extensively enough to see whether this is true. Future versions may consist of tweaks along these lines.
To the best of my knowledge, the resource data object Wordle Word List is a combination of all possible Wordle-related words (i.e. a Union of the two above-mentioned word lists).
There are plans for future versions to implement:
allowing users to choose from different word lists (the Wordle one, WordList, and maybe others)
adjusting the number of initial guesses
specifying whether guesses of length len!=5 are allowed
specifying whether non-list guesses are allowed
(possibly) choosing formatting options (colors, etc.) for the game itself
Special thanks to Bob Sandheinrich for finding a coloring error in a previous version of this resource.
Despite its awesomeness, the recent blog implementation by David Reiss is totally independent from this resource. Even so, the author thanks David for his generous conversations concerning Wordle and this resource in particular.
Many thanks to the WFR Reviewers for their feedback and improvement suggestions. The implementation is much better now than it was before review.

License Information