Skip to main content
Skip to content
Free · runs in your browser

Learn to code in apni bhasha.

AltFLang is a small, complete programming language with Hindi-rooted keywords. Write rakho, agar and karya, and a real interpreter runs it instantly. Lessons, examples and a full editor — no install, no account.

  • 12 guided lessons
  • 20+ example programs
  • Hinglish error hints
namaste.altf
// AltFLang — likho jaise bolte ho.
rakho naam = "Duniya";
rakho baar = 3;

karya namaste(kisko) {
  lautao "Namaste, " + kisko + "!";
}

chalo (rakho i = 1; i <= baar; i += 1) {
  bol(namaste(naam), "(" + shabd(i) + ")");
}

rakho phal = ["aam", "kela", "seb"];
bol("Bade akshar:", har(phal, karya (p) { lautao bada(p); }));

Why AltFLang

Built to be read out loud

What if the keywords matched the language you think in? That one idea, plus a real interpreter, is AltFLang.

  • Keywords you already say

    rakho, bol, agar, warna, jab_tak, karya, lautao. Most people can read an AltFLang program before they open the docs.

  • Runs entirely in your browser

    A hand-written lexer, parser and interpreter in client-side JavaScript. No server, no account — your code never leaves the tab.

  • A real language

    Closures, recursion, function values, lists, objects and errors that point at the exact line and column.

  • Lessons that check your answer

    Every lesson ends with a task. Press Check and the interpreter runs your code and compares the output line by line.

  • Hinglish error hints

    Typed if instead of agar, or forgot a semicolon? The error tells you what went wrong and how to fix it.

  • See the JavaScript

    The playground translates your program to JavaScript side by side, so moving on to a mainstream language is one step.

Side by side

The same program, in words you already speak

Same control flow, same semantics as JavaScript — with the vocabulary swapped for one a Hindi speaker reads at a glance.

JavaScript
function fizzBuzz(limit) {
  for (let i = 1; i <= limit; i++) {
    if (i % 15 === 0) {
      console.log("FizzBuzz");
    } else if (i % 3 === 0) {
      console.log("Fizz");
    } else if (i % 5 === 0) {
      console.log("Buzz");
    } else {
      console.log(i);
    }
  }
}

fizzBuzz(15);
AltFLang
karya fizzBuzz(seema) {
  chalo (rakho i = 1; i <= seema; i = i + 1) {
    agar (i % 15 == 0) {
      bol("FizzBuzz");
    } warna agar (i % 3 == 0) {
      bol("Fizz");
    } warna agar (i % 5 == 0) {
      bol("Buzz");
    } warna {
      bol(i);
    }
  }
}

fizzBuzz(15);

More side-by-side programs in the example gallery.

Syntax

The whole language, on one screen

Fifteen keywords. Tap any one for its own guide with examples and the JavaScript and Python it maps to.

AltFLang keywords, their meaning, and the JavaScript equivalent
KeywordWhat it does
rakhoDeclare a variable
pakkaDeclare a constant
bol / chhapPrint to the console
agar / warnaBranch on a condition
jab_takLoop while a condition holds
chaloCounted loop
karyaDefine a function
lautaoReturn a value
bhang / aageBreak out / skip ahead
sahi / galatBoolean literals
khaliThe empty value

Built-in helpers

A small standard library for text, lists, objects, input and maths. All of them are in the cheat sheet and the reference.

Text
badachhotasaafkaatomilaobadlo
Lists
lambaijodonikalochhantokramharchunoikatthakul
Search & slice
shamilkhojotukdaulta
Objects & types
chabiyanmulyaprakarsankhyashabd
Input, time & maths
puchosamayganit

Who it is for

Made for learners, teachers and the curious

  • First-time coders

    Learn what a variable, a loop and a function are without fighting English keywords at the same time.

  • Teachers and tutors

    Share a link to a ready program, set a lesson exercise as homework, or project the playground in class.

  • Developers

    A compact, readable tree-walking interpreter — a fun way to see how lexers, parsers and scopes fit together.

FAQ

Questions people ask

What is AltFLang?

AltFLang is a small programming language whose keywords are everyday Hindi and Hinglish words, such as rakho for a variable, agar for if and karya for a function. It runs in your browser on AltFTool.

Is AltFLang free to use?

Yes. The playground, lessons, examples and docs are free and need no sign-up or install.

Can I learn programming in Hindi with AltFLang?

Yes. The twelve lessons teach variables, conditions, loops, functions, lists, objects and input using Hindi-rooted keywords, and every lesson ends with an exercise that checks your answer.

How is AltFLang different from JavaScript or Python?

The ideas are the same — variables, if/else, loops, functions — but the keywords are Hinglish. The playground can show the JavaScript version of any program, so the move to a mainstream language is easy.

Does my code get uploaded anywhere?

No. The lexer, parser and interpreter run in your browser tab. Your work is saved only in your own browser's storage, and a share link carries the code inside the URL.

Can AltFLang read user input?

Yes. pucho() reads the next line from the playground's input box, so you can write calculators, quizzes and other interactive programs.

Likhna shuru karein?

The playground opens with a working program, input box, examples and the reference one click away.

Launch the playground
bol("Namaste, duniya!");

Want the new stuff first?

AltFLang keeps growing. Leave your email and we’ll tell you when new lessons, keywords and playground features land.

New keywords and playground features, nothing else.

Privacy policy

About this page

AltFLang: a Hinglish programming language on AltFTool

AltFLang is a small programming language on AltFTool whose keywords are everyday Hindi and Hinglish words: rakho for a variable, agar for if, karya for a function and bol to print. It is built for learning to code in Hindi, and programs run in your browser.

The section has twelve step-by-step lessons, example programs shown with their output, a keyword reference, documentation, a cheat sheet and a playground editor where you can write code, pass it input and see the JavaScript version of the same program.

People also search for

  • coding in hindi
  • hinglish programming language
  • learn programming in hindi
  • hindi coding language
  • programming for beginners hindi
  • online code runner
  • hindi programming language online
  • learn coding in hinglish