JavaScript Boolean Methods

Beginner
4 min read
Updated: Nov 2026
2 method guides
Method index

About This Index

This page is the JavaScript Boolean Methods index for the tutorial track. Each row links to a full guide with syntax, three runnable examples, browser notes, and FAQs.

Learn what a Boolean is, how truthy and falsy values work, and why new Boolean(false) is a trap on /js/boolean. Use this page when you need one of the two methods: toString() turns true or false into text, and valueOf() unwraps a Boolean object into the plain value.

Only two methods, both instance methods.

A Boolean has just two possible values, so there is little to do with it. Both methods are called on a value: true.toString(). There are no static methods such as Boolean.parse() (it is undefined). To turn text back into a Boolean, compare it: text === "true".

How to Call a Boolean Method

Both methods take no arguments. You call them with a dot on a Boolean value, or on a Boolean object:

JavaScript
// Both methods are called on a Boolean value (or a Boolean object)
true.toString();                        // "true"
(false).toString();                     // "false"
true.valueOf();                         // true
new Boolean(false).valueOf();           // false

// There are no static methods such as Boolean.parse()
typeof Boolean.parse;                   // "undefined"
"true" === "true";                      // true (how you turn text back into a Boolean)

The comments show what each line gives back. Text in quotes is a string, and true or false without quotes is a real Boolean.

JavaScript Boolean Methods Table

All method guides in this JavaScript tutorial series (2 tutorials), grouped by what they do.

Convert a Boolean

2 methods

Both are instance methods: call them on a Boolean value such as true. One turns it into text, the other unwraps a Boolean object.

MethodDescriptionTutorial
toString()Turn true or false into the text "true" or "false".Open
valueOf()Get the plain true or false out of a Boolean object (a wrapper).Open

Frequently Asked Questions

Two of its own: toString() and valueOf(). Both are instance methods. A Boolean also inherits a few general methods from Object, such as toLocaleString(), but these two are the ones you will meet.
Start with toString(). It turns true or false into text for labels, logs, and URLs, and it shows why the text "false" is truthy. Then learn valueOf() to understand Boolean objects.
Boolean(value) converts the value and returns a plain true or false. new Boolean(value) returns a Boolean object, which has typeof "object" and is always truthy, even when it holds false. Use the first one.
No. Boolean has no static methods. Compare the text instead: text === "true". Do not use Boolean(text), because every non-empty string, including "false", is truthy.
Rarely. JavaScript calls toString() when you join a Boolean with text, and valueOf() when a Boolean object is used in math or in a loose comparison. You call them yourself for explicit text, or to unwrap a Boolean object.

Start with Boolean toString()

Turn true or false into text for a label or a query string, and learn why the text "false" is truthy.

toString() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

14 people found this page helpful