Loading

Search Code

Search code contents

Close File Browser

Execution Mode

Live: will automatically execute upon every character typed (warning: could result in issues if you have intensive or partially-completed code that results in an infinite loop)

Exited code editor: will automatically execute code when the code editor loses focus - i.e. when you click outside of the code editor

Run on click: code will only be executed when you click the triangular run/play button

File Manager

Search & browse files easily

Pseudocode

Write and run pseudocode

Java

See a Java equivalent to your pseudocode program

Note: the site doesn't allow executing Java. An IDE like IntelliJ will provide an easy installation of the JDK and is recommended for running Java locally

Python

See a Python equivalent to your pseudocode program

Note: the site doesn't allow executing Python. An IDE like PyCharm will provide an easy installation of the Python interpreter and is recommended for running Python locally

Visual Basic

See a Visual Basic (VB) equivalent to your pseudocode program

Note: the site doesn't allow executing Visual Basic. An IDE like Visual Studio will provide an easy installation of the Visual Studio compiler and is recommended for running Visual Basic locally

New Program

Choose from a number of pre-made programs or create your own

Modifying a pre-made program will automatically create a new program, ensuring the original & modified version are available

Create Trace Table

Automatically create trace tables for your code

Can use the BREAKPOINT keyword to add breakpoints at specific parts of your program

Use TRACE_NEXT_ROW to force new row to be created in trace table

Autoformat Code

Toggle original/formatted code

Pretty-printing/auto-formatting code will insert new lines, indentation and apply consistent styling rules. If enabled, pretty-printing will also occur each time you run your program

You can even try writing your entire program on one line...and it should still run and be formatted correctly :)

Note: code may be re-ordered (e.g. all declarations moved to the top) due to the way the site works

Tested and works for all demo programs - please contact me if this breaks any of your working code!

Show Abstract Syntax Tree

Display a visual representation of the parse result of the program

Load

Load a previously-saved pseudocode file (.pseudo default extension)

Download

Download one or more .pseudo files for future use (e.g. backup/sharing/transferring to a different device)

Programs will be saved periodically (every 10 seconds) to your browser's local storage if changes are made - this means you can access your programs across multiple tabs

Note that these local saves won't persist next time you open the site if you were using it in a private window - clearing your browser's cache will also cause all your programs to be lost

Upload

Save your program for public-viewing by anyone

Sharing

Share a direct link containing your code - your code will be contained in the URL and NOT stored on the server

Alternatively, you can select the upload option to upload your code publicly to the server

Quiet Editor

Remove bloat like the navigation bar & footer to focus only on the code editor

Note: can be toggled with CTRL + Q (quiet mode)

Fullscreen Quiet Mode

Toggle between regular and fullscreen mode

Note: pressing FN/F11/ESC keys isn't recommended, since they can't be detected by the site, hence the additional 'quite mode' settings can't be applied - the removing of the nav bar & footer. To enter this fullscreen mode, either use this button or the keyboard shortcut CTRL + M (minimise <-> maximise)

Add Favourite

Add this code as a favourite you can view later

No errors βœ…

Error Checks

The site aims to enforce the statically-typed nature of pseudocode - i.e. assigning a STRING to an INTEGER variable should be forbidden. Some combinations are allowed, however - such as assigning a CHAR to a STRING or an INTEGER to a REAL. Other additional checks to ensure valid pseudocode are also in place

The site has been well-tested and there aren't any bugs we are aware of, however, if you believe the site is incorrectly giving you an error & preventing your code from running, you can disable the error-checking

In such cases, please feel free to contact us

Note that it is not possible to disable fatal error messages such as syntax errors, runtime errors etc

Subroutine Signature Hints

If enabled, the following information will be shown:

  • Keyword/Identifier/Module Name Suggestions
  • Subroutine parameters & types
  • Return types
  • Subroutine descriptions
  • Examples

Switch Program Shortcuts

Choose whether CTRL + SHIFT + LEFT/RIGHT should navigate to the previous program - can be disabled to prevent accidental triggering

Toggle Keyboard Shortcuts

Enable or disable this website's additional keyboard shortcuts (switch program, change font size, code execution etc) - note: standard editor & browser shortcuts will still apply

Use Assignment Arrow

Will cause "<-" to be replaced with the Unicode "←" symbol as the user is typing - can also use CTRL + SHIFT + < to insert this symbol

Allow LENGTH() for Arrays

Turning this on will disable the warning message if using the LENGTH function to get the number of elements in an array

Require Variable Initialisation

If enabled, you will get warnings if trying to access uninitialised variables

Code Snippets

These are pre-written code templates - for example, if you type in "DECLARE" in the code editor, you will see options to declare single variables, 1 & 2D arrays - you can disable this option

Show Toolbar Program Browser

If enabled, will show the program browser in the toolbar even if the sidebar file browser is open

Show Welcome Message

Toggle the welcome message/popup in the bottom right corner from showing

Wait for Tips

Will show the loading screen until at least the tip (hint) has been displayed, even if the site is fully loaded. Disabling this can hence make the editor screen appear faster, if the page is ready

Max Execution Time

To prevent infinite loops resulting in the page becoming unresponsive, code will automatically terminate if this value (in seconds) is exceeded

If you have a legitimate long-running program, you can obviously set this to a high value - alternatively, setting to -1 will disable this check

IGCSE Syllabus (Pseudocode p35) O-Level Syllabus (Pseudocode p35) A-Level Syllabus A-Level Pseudocode Guide A-Level Pseudocode Functions Report Bugs
YouTube Tutorials Discord Help
AssemblyCode BooleanLogic CIESchedule Program52
DemosπŸ§‘πŸ»β€πŸ« Keyword ListπŸ“œ Monthly Challenge: Getting...πŸ“†
{"0":"Algorithms","1":"Selection","2":"Iteration","3":"Arrays","4":"Records","5":"ENUMs","6":"Custom Modules","7":"Files","8":"Object-Oriented Programming","9":"Abstract Data Types","10":"Sets","11":"Pointers","12":"Recursion","13":"Exam Questions","14":"Games","15":"Mathematics","16":"Art","17":"Utilities","18":"Other"}

Welcome to Pseudocode Pro

This site was developed to solve the problems of students either being completely stuck with pseudocode, or attempting a solution, but having no way of actually validating if it would work (other than a manual trace table). This site supports the entire Cambridge IGCSE (0478), O-Level (2210) and 9618 A-Level pseudocode specifications from the guide/syllabus, with extension modules supporting sound, canvas, events, custom html etc

Below are lists of both the currently support pseudocode and general website features:

  • πŸ“¦ Variables & Constants
  • βž• Arithmetic & Logical Operators
  • πŸ“₯πŸ“€ INPUT & OUTPUT
  • β“βŒ IF/ELSE & CASE
  • πŸ” FOR/WHILE/REPEAT...UNTIL Loops
  • πŸ”§ FUNCTIONS & PROCEDURES
  • πŸ”’ BYVAL & BYREF
  • πŸ”’ ARRAYs
  • πŸ“’ TYPEs (Records & Enums)
  • πŸ“„ File Handling (Text & RANDOM)
  • 🧩 Object-Oriented Programming
  • πŸͺ£ Sets
  • πŸ‘‰ Pointers
  • --- Extra Non-Syllabus Features ---
  • πŸ”Š Sound
  • 🎨 Canvas
  • πŸ–²οΈ Events
  • πŸ–₯️ Custom HTML

Additional programs uploaded by the community can be found on the search page.

While you are here, why not try one of the many - and ever increasing list of - pseudocode coding challenges.

To support hosting & domain costs, for $2, a premium account can be purchased - this has the following benefits:

Those last 2 features are currently in progress, so an extra 3 months free will be given to anyone who buys a license now to acknowledge this

For any issues, feature requests, comments etc, you can contact me

Token List

Work in progress: some buttons currently don't work...just select "All"

Token Description Example Parameters

Thanks for using the site - I hope you enjoy it and if you do, it would mean a lot if you could share it with your friends too :)

Drag & drop code or data files here

{"c":"\/\/ * Code Author: aesaibnahmed@gmail.com\n\/\/ * Date: 2026\/02\/07\n\/\/ * Description: \n\/\/ * Categories: \n\n\/\/ * Code Author: aesaibnahmed@gmail.com\r\n\/\/ * Date: 2026\/02\/07\r\n\/\/ * Description: \r\n\/\/ * Categories: \r\n\r\n\/\/ * Code Author: aesaibnahmed@gmail.com\r\n\/\/ * Date: 2026\/02\/06\r\n\/\/ * Description: \r\n\/\/ * Categories: \r\n\r\n\/\/ * Code Author: aesaibnahmed@gmail.com\r\n\/\/ * Date: 2026\/02\/06\r\n\/\/ * Description: \r\n\/\/ * Categories: \r\n\r\n\/\/ * Code Author: aesaibnahmed@gmail.com\r\n\/\/ * Date: 2026\/02\/06\r\n\/\/ * Description: \r\n\/\/ * Categories: \r\n\r\n\/\/ Challenge 1: Hello World\r\n\/\/ Create a program to ask for a user's name, then output a greeting to them\r\n\/\/ Examples:\r\n\/\/ If they input their name as Fred , then the program should output Hello Fred! \r\n\/\/ Extension:\r\n\/\/ Add code to keep asking the user to try again, if they don't enter a valid name (e.g. no characters). You could add additional validation rules yourself if you'd like - for example, perhaps the name has to only contain characters in the set A-Z\r\n\r\n\r\n\/\/ Defining functions.\r\n\r\n\/\/ This function will take the user's name.\r\nFUNCTION TakeUserName RETURNS ARRAY OF STRING\r\n \/\/ This will contain all the user's input concatenated.\r\n DECLARE UserInput:ARRAY[1:2] OF STRING\r\n \/\/ This variable will be used to store the name.\r\n DECLARE UserName:STRING\r\n \/\/ This will store a character depending on the type of loop the user wants the program to use.\r\n DECLARE DesiredImplementation:CHAR\r\n \/\/ The user is prompted to enter their desired implementation of the program.\r\n OUTPUT \"Would you like the program to use a WHILE (w) or FOR (f) loop?: \"\r\n INPUT DesiredImplementation\r\n \/\/ The user is prompted to input their name.\r\n OUTPUT \"The character limit is 10.\"\r\n OUTPUT \"Please enter your name, or type -1 or q to exit: \" \r\n INPUT UserName \/\/ Their input is stored in the variable.\r\n\r\n UserInput[1] \u2190 UserName\r\n UserInput[2] \u2190 DesiredImplementation\r\n\r\n RETURN UserInput\r\n\r\n \r\nENDFUNCTION\r\n\r\n\/\/ This function will check whether the input is valid.\r\nFUNCTION CheckNameValidityFOR(UserName:STRING) RETURNS INTEGER\r\n \/\/ This variable will store a value depending on the nature of the input.\r\n DECLARE Validity:INTEGER\r\n \/\/ This variable will hold the set of acceptable characters.\r\n DECLARE ValidSet:ARRAY[1:26] OF CHAR\r\n \/\/ The letters A-Z are acceptable.\r\n ValidSet \u2190 ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']\r\n \/\/ Selection based on the input.\r\n \/\/ This returns -1 if the user wishes to terminate the program.\r\n IF UserName = \"-1\" OR LCASE(UserName) = \"q\" THEN\r\n RETURN -1\r\n ELSE\r\n IF UserName = \"\" THEN\r\n Validity \u2190 0 \/\/ If nothing was input, 0 is returned.\r\n ELSE\r\n IF LENGTH(UserName) > 10 THEN\r\n Validity \u2190 2 \/\/ If the input was too long, 2 is returned.\r\n ELSE\r\n \/\/ This variable will store the number of acceptable characters in the user's input.\r\n DECLARE CharsAccepted:INTEGER\r\n CharsAccepted \u2190 0 \/\/ Initialize to 0.\r\n \/\/ This stores each character temporarily for comparison with the valid character set.\r\n DECLARE NameChar:CHAR\r\n \/\/ Iterates through each character in the user's input.\r\n FOR Chars \u2190 1 TO LENGTH(UserName)\r\n \/\/ Each time, the current character is stored temporarily for comparison.\r\n NameChar \u2190 LCASE(SUBSTRING(UserName, Chars, 1))\r\n \/\/ Iterates through the valid character set.\r\n FOR ValidChar \u2190 1 TO 26\r\n \/\/ Checks if the current character being checked from the user's input matches the current character being checked against in the valid set.\r\n IF ValidSet[ValidChar] = NameChar THEN\r\n \/\/ If yes, the counter for accepted characters is incremented.\r\n CharsAccepted \u2190 CharsAccepted + 1\r\n ENDIF\r\n NEXT ValidChar\r\n NEXT Chars\r\n \/\/ Checks if the number of accepted characters is equal to the number of characters inputted, i.e. if all the inputted characters were accepted\r\n IF CharsAccepted = LENGTH(UserName) THEN\r\n Validity \u2190 1 \/\/ If yes, 1 is returned.\r\n ELSE\r\n Validity \u2190 3 \/\/ If the input contained unacceptable characters, 3 is returned.\r\n ENDIF\r\n ENDIF\r\n ENDIF\r\n ENDIF\r\n \/\/ The status of acceptability of the input is returned.\r\n RETURN Validity\r\nENDFUNCTION\r\n\r\n\/\/ This function will check whether the input is valid.\r\nFUNCTION CheckNameValidityWHILE(UserName:STRING) RETURNS INTEGER\r\n \/\/ This variable will store a value depending on the nature of the input.\r\n DECLARE Validity:INTEGER\r\n \/\/ This BOOLEAN will specifically store a value depending on if the user's input contained invalid characters.\r\n DECLARE ValidityString:BOOLEAN\r\n ValidityString <- TRUE\r\n \/\/ This variable will hold the set of acceptable characters.\r\n DECLARE ValidSet:ARRAY[1:26] OF CHAR\r\n \/\/ The letters A-Z are acceptable.\r\n ValidSet \u2190 ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']\r\n \/\/ Stores the current character from the user's input being checked for.\r\n DECLARE CurrentChar:CHAR\r\n \/\/ Counter that stores the current index of the valid set being checked against.\r\n DECLARE SetCount:INTEGER\r\n \/\/ Boolean for whether the current character being checked for was found in the valid set, i.e. if the current character being checked for is valid.\r\n DECLARE CharFound:BOOLEAN\r\n \/\/ Counter that stores the current index of the character from the user's input being checked for.\r\n DECLARE CharCount:INTEGER\r\n CharCount \u2190 1\r\n \/\/ Selection based on the input.\r\n \/\/ This returns -1 if the user wishes to terminate the program.\r\n IF UserName = \"-1\" OR LCASE(UserName) = \"q\" THEN\r\n RETURN -1\r\n ELSE\r\n IF UserName = \"\" THEN\r\n Validity \u2190 0 \/\/ If nothing was input, 0 is returned.\r\n ELSE\r\n IF LENGTH(UserName) > 10 THEN\r\n Validity \u2190 2 \/\/ If the input was too long, 2 is returned.\r\n ELSE\r\n WHILE ValidityString = TRUE AND CharCount <= LENGTH(UserName) DO\r\n CurrentChar \u2190 SUBSTRING(LCASE(UserName),CharCount,1)\r\n SetCount \u2190 1\r\n CharFound \u2190 FALSE\r\n WHILE CharFound = FALSE AND SetCount <= 26 DO\r\n IF CurrentChar = ValidSet[SetCount] THEN\r\n CharFound \u2190 TRUE\r\n ENDIF\r\n SetCount \u2190 SetCount + 1\r\n ENDWHILE\r\n\r\n IF CharFound = FALSE THEN\r\n ValidityString <- FALSE\r\n ENDIF\r\n\r\n CharCount \u2190 CharCount + 1\r\n\r\n ENDWHILE\r\n\r\n IF ValidityString = TRUE THEN\r\n Validity <- 1\r\n ELSE\r\n Validity <- 3\r\n ENDIF\r\n \/\/ Checks if the number of accepted characters is equal to the number of characters inputted, i.e. if all the inputted characters were accepted\r\n ENDIF\r\n ENDIF\r\n ENDIF\r\n \/\/ The status of acceptability of the input is returned.\r\n RETURN Validity\r\nENDFUNCTION\r\n\r\n\/\/ This function will display a message to the user.\r\nPROCEDURE Reply(UserName:STRING, Validity:INTEGER)\r\n \/\/ Selection based on validity of input.\r\n IF Validity = 1 THEN\r\n \/\/ The user is greeted if the input was valid.\r\n OUTPUT \"Hello \", UserName, '!'\r\n ELSE\r\n IF Validity = 0 THEN\r\n \/\/ If nothing was input, the user is notified accordingly.\r\n OUTPUT \"Nothing was input. Please enter your name.\"\r\n ELSE\r\n IF Validity = 2 THEN\r\n \/\/ If the input was too long, a shorter input is prompted.\r\n OUTPUT \"Exceeded character limit. Enter a nickname or abbreviation instead.\"\r\n ELSE\r\n IF Validity = 3 THEN\r\n OUTPUT \"Acceptable characters are only the 26 letters of the English alphabet.\"\r\n ELSE\r\n \/\/ The user is notified as the program terminates.\r\n OUTPUT \"Terminating.\"\r\n ENDIF\r\n ENDIF\r\n ENDIF\r\n ENDIF\r\nENDPROCEDURE\r\n\r\n\/\/ The main piece of code.\r\nPROCEDURE Main\r\n DECLARE UserInput:ARRAY[1:2] OF STRING\r\n DECLARE Validity:INTEGER\r\n\r\n Validity \u2190 0\r\n\r\n \/\/ The program loop that runs indefinitely until '-1' or 'q' is inputted.\r\n WHILE Validity > -1 DO\r\n \/\/ The values returned by TakeUserName() is stored in a local array.\r\n UserInput \u2190 TakeUserName()\r\n \/\/ Selects based on whether the user wants a WHILE or FOR loop.\r\n IF UserInput[2] = 'w' THEN\r\n OUTPUT \"Using WHILE.\"\r\n \/\/ The input status is checked by the WHILE loop version of CheckNameValidity() and stored.\r\n Validity \u2190 CheckNameValidityWHILE(UserInput[1])\r\n ELSE\r\n OUTPUT \"Using FOR.\"\r\n \/\/ The input status is checked by the FOR loop version of CheckNameValidity() and stored.\r\n Validity \u2190 CheckNameValidityFOR(UserInput[1])\r\n ENDIF\r\n \/\/ The two variables are passed as arguments for the Reply function.\r\n CALL Reply(UserInput[1],Validity)\r\n ENDWHILE\r\nENDPROCEDURE\r\n\r\n\/\/ The main subroutine is called.\r\nCALL Main()","t":"Challenge - Hello World"}
0478