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 Array Multi-Assignment

If enabled, you won't get warnings for assigning all values to an array in one statement - e.g. myArray <-- [1, 2, 3]

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πŸ§‘πŸ»β€πŸ« KeywordsπŸ“œ 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: SharpPencil\n\/\/ * Date: 2026\/05\/04\n\/\/ * Description: A sequel to my first game, 'The Bird Knight'\r\n\/\/ A text-based adventure game\n\/\/ * Categories: Games\n\n\/\/ * Code Author: SharpPencil\r\n\/\/ * Date: 2026\/05\/04\r\n\/\/ * Description: A sequel to my first game, 'The Bird Knight'\r\n\/\/ A text-based adventure game\r\n\/\/ * Categories: Games\r\n\r\n@\r\nHi! Please pay attention\r\nThis game was too large to upload as one file, so I've split it into bits. If you would like to play, please:\r\n1) Open the code editor\r\n2) Copy and paste the different bits into it\r\n3) Ensure that you have all the bits, and that they are in the right order\r\n4) Ensure this part is not copied\r\n5) Ensure that code isn't automatically translated to keywords (Please do not convert 'Random' and any numbers into keywords\/line numbers)\r\n6) If you have any difficulties, make sure you are using the O-Level syllabus\r\n7) Have fun!\r\n@\r\n\r\n\/\/ Paths\r\nPROCEDURE NestArea()\r\n OUTPUT \"\r\nYou float into the air, and your body seemingly starts moving on its own towards the familiar smell of nectar. The smell only gets stronger as you're moved into a large room, but you can't focus on that as your attention is grabbed by the large, colourful flowers in the middle of it. As you continue towards it, your trance is interrupted by a small squeak behind you. You instantly turn around, to see a baby humming bird feeding on nectar. You turn again as you hear a small crack. A baby pigeon emerges out of an egg.\r\n1. Kill it\r\n2. Spare it\"\r\n CALL Decision()\r\n IF Choice = 1 THEN\r\n OUTPUT \"You can't let the bird kingdom gain any more knights. You raise your blade, and strike. Your blade is parried, launching you backward. Two large pigeons descend, holding swords. They tap the ground, and the floor itself, which turns out to be a nest tries to attack you. Your eyes widen as you realise you're up against the bird kingdoms greatest two knights; Beakonce and Wingston.\"\r\n Nest \u2190 TRUE\r\n ELSE\r\n OUTPUT \"You step backward slowly. No need to kill an unarmed baby bird. Two large pigeons descend, covering the child with their bodies. They give you a slight nod, acknowledging your kindness. They draw their swords slowly, warning you of their attack. Your eyes widen as you realise you're up against the bird kingdoms greatest two knights; Beakonce and Wingston.\"\r\n Nest \u2190 FALSE\r\n ENDIF\r\n CALL MainBossfight()\r\n IF HP <= 0 THEN\r\n OUTPUT \"GAME OVER.\"\r\n CALL GameEnd()\r\n ELSE\r\n OUTPUT \"You sigh heavily, as you stand before the bodies of the two knights. Just in time, your bee army enters, a group of them holding a crown. You place it on your head, balancing it on your other crown. You have just overthrown the bird kingdom. All their resources are yours now. The only way things could get better is if maybe you could find a way to increase your lifespan. But for now, you're happy. The butterfly people will rejoice.. right? All it took was the lives of hundreds of innocent birds. (WIN)\"\r\n CALL GameEnd()\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE GateFight()\r\n OUTPUT \"A chill rolls down your wings, realising that your only option now is to fight the only crow that didn't lose you.\"\r\n OppHP \u2190 250\r\n CALL CrowBoss()\r\n IF HP <= 0 THEN\r\n OUTPUT \"GAME OVER.\"\r\n CALL GameEnd()\r\n ENDIF\r\n IF HP > 0 THEN\r\n OUTPUT \"The crow drops to the floor. You stand there for a second, breathing heavily as the blood pours out of the crow who's goal was to protect his homeland. You pick up his mace off the floor, and admire it, when you're interrupted by a familiar aroma. (MACE AQUIRED!)\"\r\n MaceFound \u2190 TRUE\r\n OUTPUT \"+5 Skills Points!\"\r\n SkillPoints \u2190 (SkillPoints + 5)\r\n CALL SkillShop\r\n CALL NestArea()\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE GateBreaking()\r\n OUTPUT \"You crack your wings like a whip, and burst through the skies, directly towards the gate. How do you knock it down?\r\n1. Pollen Beam\r\n2. Flap\"\r\n CALL Decision()\r\n IF Choice = 1 THEN \/\/ Mana Check\r\n IF Mana >= 15 THEN\r\n OUTPUT \"Going full speed, you focus your mana on your antennas, and unleash a powerful beam of pollen at the gate. Just as the gate shatters into pieces, you fly through it, landing with the debris.\"\r\n ELSE\r\n OUTPUT \"Going full speed, you focus your mana on your antennas, and a few small particles of pollen attack the gate. Unable to stop yourself now, you hit the gate at top speed, crashing through it. You skip like a pebble on a pond through the ground, losing 25 HP.\"\r\n HP \u2190 (HP - 25)\r\n ENDIF\r\n ENDIF\r\n IF Choice = 2 THEN \/\/ Strength Check\r\n IF Strength > 7 THEN\r\n OUTPUT \"Going full speed horizontally, you suddenly jolt into a vertical position and flap your wings hard. Just as the gate shatters into bits, you fly through it, landing gracefully around the debris.\"\r\n ELSE\r\n OUTPUT \"Going full speed horizontally, you attempt to jolt into a vertical position. You flap your wings too early,and only manage to barely send a gust at the gate. Unable to step yourself now, you hit the gate at top speed, crashing through it. You skip like a pebble on a pond through the ground, losing 25 HP.\"\r\n HP \u2190 (HP - 25)\r\n ENDIF\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE Gate()\r\n CALL GateBreaking()\r\n OUTPUT \"\r\nA bell rings somewhere above you, signaling your arrival. A murderous looking murder of crows descends rapidly to your level. You instantly burst through the rubble, further into the castle. You can only assume that they're following as you zig-zag through hallways. You halt, almost splattering yourself on the wall as you reach a dead end. What do you do?\r\n1. Fight\r\n2. Flee\"\r\n CALL Decision\r\n IF Choice = 1 THEN\r\n CALL GateFight()\r\n ENDIF\r\n IF Choice = 2 THEN\r\n IF Speed >= 6 THEN\r\n OUTPUT \"You fake a strike, and when the crow blocks, you dash right past him and speed away.\"\r\n CALL Sneak()\r\n ELSE \r\n OUTPUT \"You attempt to dash away, but get blocked by a mace.\"\r\n CALL GateFight()\r\n ENDIF\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE SneakRun()\r\n OUTPUT \"You run outside, bumping straight into a guard.\"\r\n CALL RandomEncounter\r\n OppHP \u2190 200\r\n IF HP <= 0 THEN\r\n OUTPUT \"GAME OVER.\"\r\n CALL GameEnd()\r\n ELSE\r\n OUTPUT \"The bird drops to the floor. You stand there for a second, breathing heavily as the blood pours out of the bird who's goal was to protect his homeland.\"\r\n OUTPUT \"+5 Skills Points!\"\r\n SkillPoints \u2190 (SkillPoints + 5)\r\n CALL SkillShop \r\n OUTPUT \"You're thoughts are interrupted by a familiar aroma.\"\r\n CALL NestArea()\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE Sneak()\r\n OUTPUT \"You fly through the halls, when you suddenly hear footsteps. Holding your breath, you press your ears against the first door you see. Upon not hearing anything, you rush inside and block the entrance with a nearby chair. You look around at the seemingly empty room, which is made completely out of ice somehow, despite the outside wall being brick. You let out a sign of relief, but then you start to hear snoring. A penguin is asleep on the ice couch beside you.\r\n1. Run outside\r\n2. Kill the penguin\"\r\n CALL Decision()\r\n IF Choice = 1 THEN\r\n IF Speed > 6 THEN\r\n CALL SneakRun()\r\n ELSE\r\n OUTPUT \"You try and run, but your too hasty and knock over the chair keeping the door shut. The penguin opens its eyes, and stands up instantly, holding a lance it was sleeping next to some reason.\"\r\n OppHP \u2190 200\r\n CALL PenguinBoss()\r\n IF HP <= 0 THEN\r\n OUTPUT \"GAME OVER.\"\r\n CALL GameEnd()\r\n ELSE\r\n OUTPUT \"The Penguin drops to the ground. You stand there for a second, breathing heavily as the blood paints the icy blue floor. You pick up his lance off the floor, and admire it, when you're interrupted by a familiar aroma. (LANCE AQUIRED!)\r\n \"\r\n OUTPUT \"+5 Skills Points!\"\r\n SkillPoints \u2190 (SkillPoints + 5)\r\n CALL SkillShop\r\n LanceFound \u2190 TRUE\r\n CALL NestArea()\r\n ENDIF \r\n ENDIF\r\n ENDIF\r\n IF Choice = 2 THEN\r\n OUTPUT \"You hold your blade over the penguin, when it suddenly opens its eyes, and stands up instantly, holding a lance it was sleeping next to for some reason.\"\r\n OppHP \u2190 200\r\n CALL PenguinBoss()\r\n IF HP <= 0 THEN\r\n OUTPUT \"GAME OVER.\"\r\n CALL GameEnd()\r\n ELSE\r\n OUTPUT \"The Penguin drops to the ground. You stand there for a second, breathing heavily as the blood paints the icy blue floor. You pick up his lance off the floor, and admire it, when you're interrupted by a familiar aroma. (LANCE AQUIRED!)\"\r\n OUTPUT \"+5 Skills Points!\"\r\n SkillPoints \u2190 (SkillPoints + 5)\r\n CALL SkillShop\r\n LanceFound \u2190 TRUE\r\n CALL NestArea()\r\n ENDIF\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE Alone()\r\n CALL Decision\r\n IF Choice = 1 THEN\r\n IF Speed >= 7 THEN\r\n OUTPUT \"You blitz past the boulder with ease\"\r\n ENDIF\r\n IF Speed < 7 AND Speed >= 4 THEN\r\n OUTPUT \"You barely scrape past the boulder in time, taking 15 DMG\"\r\n HP \u2190 (HP - 15)\r\n ENDIF\r\n IF Speed < 4 THEN\r\n OUTPUT \"Unable to dodge it, it hits you head on, dealing 35 DMG\"\r\n HP \u2190 (HP - 3)\r\n ENDIF\r\n ENDIF\r\n IF Choice = 2 THEN\r\n IF Strength >= 7 THEN\r\n OUTPUT \"You slice through the boulder with ease\"\r\n ENDIF\r\n IF Strength < 7 AND Strength >= 4 THEN\r\n OUTPUT \"The boulder breaks, but not cleanly. Your blade seems to be somewhat damaged, and the shrapnel deals 15 DMG\"\r\n HP \u2190 (HP - 15)\r\n SlashC \u2190 (SlashC - 1)\r\n ENDIF\r\n IF Strength < 4 THEN\r\n OUTPUT \"The boulder doesn't break, and hits you head on, dealing 35 DMG. Your blade also seems heavily damaged\"\r\n HP \u2190 (HP - 35)\r\n SlashC \u2190 (SlashC - 1)\r\n ENDIF\r\n ENDIF\r\n OUTPUT \"You accelerate again. Some of the bird troops attempt to follow you, but to no avail. Except for once particularly fast bird. He zooms at you, narrowly missing you with his blade. You speed up, preparing mentally for a fight.\"\r\n OppHP \u2190 100\r\n CALL RandomEncounter\r\n IF OppHP <= 0 THEN\r\n OUTPUT \"The bird falls toward the ground. You catch your breath and glide slowly towards the fortified kingdom. Birds are patrolling every direction in the skies, but they seem to have less around the ground. What will you do?\r\n1. Try to sneak in somehow\r\n2. Blast through the gate\"\r\n ELSE\r\n OUTPUT \"GAME OVER.\"\r\n CALL GameEnd\r\n ENDIF\r\n CALL Decision\r\n IF Choice = 1 THEN\r\n OUTPUT \"Using the night as cover, you sneak around close to the castle, hugging its walls. You look up, checking for any guards. When the coast is clear, you use your pollen beam, slicing through the wall like a laser cutter. With a small thump, a bit of the wall falls creating a hole. You crawl through, entering the castle.\r\n \"\r\n CALL Sneak\r\n ENDIF\r\n IF Choice = 2 THEN\r\n CALL Gate()\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE ThroneRoom()\r\n REPEAT\r\n INPUT Answer\r\n IF Answer <> 15 THEN\r\n OUTPUT \"Doesn't seem right..\"\r\n ENDIF\r\n UNTIL Answer = 15\r\n OUTPUT \"As you shout the answer, the door opens and you and your army enter into the throne room. King Crownelius sits atop his throne, eyes wide. He draws his sword and points it at you, somehow intending to fight againt your entire army by himself.\"\r\n OppHP \u2190 500\r\n CALL KingCrowneliusBoss()\r\n OUTPUT \"Suddenly, the doors to the throne room burst open. You see a flash, and then hear a loud boom as two bird figures strike at you. You block, and are knocked out the doors. You catch yourself before splattering against the wall. Your eyes widen as the figures descend, and you realise you're up against the bird kingdoms greatest two knights; Beakonce and Wingston.\"\r\n CALL MainBossfight()\r\n IF HP <= 0 THEN\r\n OUTPUT \"GAME OVER.\"\r\n CALL GameEnd()\r\n ELSE\r\n OUTPUT \"You sigh heavily, as you stand before the bodies of the two knights. Just in time, your bee army enters, a group of them holding a crown. You place it on your head, balancing it on your other crown. You have just overthrown the bird kingdom. All their resources are yours now. The only way things could get better is if maybe you could find a way to increase your lifespan. But for now, you're happy. The butterfly people will rejoice.. right? All it took was the lives of hundreds of innocent birds. (WIN)\"\r\n CALL GameEnd()\r\n ENDIF\r\nENDPROCEDURE","t":"The Butterfly Invasion (3)"}
{}
ALL