How to convert a string into uppercase in AngularJS?

AngularJSWeb DevelopmentFront End Technology

Sometimes we may need to represent a name or a string in capital letters. To convert a string into uppercase in AngularJS, we can use the uppercase filter to change its case to uppercase.


  • In HTML Template Binding
{{uppercase_expression | uppercase}}
  • In JavaScript

Example − Conversion to Upper Case

Create a file "uppercase.html" in your Angular project directory and copy-paste the following code snippet.

<!DOCTYPE html>

   <title>uppercase Filter</title>
   <script src=""></script>

<body ng-app="app"
   <h1 style="color:green">
      Welcome to Tutorials Point
   <h2 style="color: grey;">
      AngularJS | UpperCase Filter
   <div ng-controller="example">
            Original: {{message}}
            Modified: {{message | uppercase}}
      angular.module('app', [])
         .controller('example',['$scope', function($scope) {
         $scope.message = 'simply learning';


To run the above code, just go to your file and run it as a normal HTML file. You will see the following output on the browser window.

Updated on 06-Oct-2021 08:04:23