HTML | <input> formenctype Attribute

The HTML <input> formenctype Attribute is used to specify how to form-data encoded when submitting the form into the server. This attribute works with method=”post”. This attribute overrides the enctype attribute of the <form> element.


<input formenctype="value">

Attribute Values:

  • application/x-www-form-urlencoded: It is the default value. It encodes all the characters before sent to the server. It converts all spaces into “+” symbols and special character into its “hex” value.
  • multipart/form-data: This value does not encode any character.
  • text/plain: This value convert spaces into “+” symbols but special characters are not converted.






<!DOCTYPE html>
    <title>HTML input formenctype Attribute</title>
<body style="text-align: center">
    <h1 style="color: green">GeeksforGeeks</h1>
    <h4>HTML <input> formenctype Attribute</h4>
    <form action="#" method="post">
        First name:
        <input type="text" name="fname"> Last name:
        <input type="text" name="lname">
        <input type="submit" value="Submit" 



Supported Browsers: The browsers supported by HTML input formenctype Attribute are listed below:

  • Google Chrome 9.0
  • Internet Explorer 10.0
  • Firefox 4.0
  • Opera 10.6
  • Safari 5.1

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.