-US/docs/Web/HTTP/Methods/PUT) ; which is always
idempotent. The word "idempotent" means that any number of repeated, identical
requests will leave the resource in the same state. For example if an auto-
incrementing counter field is an integral part of the resource, then a [ ` PUT
` ](/en-US/docs/Web/HTTP/Methods/PUT) will naturally overwrite it (since it
overwrites everything), but not necessarily so for ` PATCH ` .

` PATCH ` (like [ ` POST ` ](/en-US/docs/Web/HTTP/Methods/POST) ) _may_ have
side-effects on other resources.

To find out whether a server supports ` PATCH ` , a server can advertise its
support by adding it to the list in the [ ` Allow ` ](/en-
US/docs/Web/HTTP/Headers/Allow) or [ ` Access-Control-Allow-Methods ` ](/en-
US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods) (for [ CORS ](/en-
US/docs/Web/HTTP/CORS) ) response headers.

Another (implicit) indication that ` PATCH ` is allowed, is the presence of
the [ ` Accept-Patch ` ](/en-US/docs/Web/HTTP/Headers/Accept-Patch) header,
which specifies the patch document formats accepted by the server.

Request has body  |  Yes   
---|---  
Successful response has body  |  May   
[ Safe ](/en-US/docs/Glossary/Safe/HTTP) |  No   
[ Idempotent ](/en-US/docs/Glossary/Idempotent) |  No   
[ Cacheable ](/en-US/docs/Glossary/Cacheable) |  Only if freshness information is included   
Allowed in [ HTML forms ](/en-US/docs/Learn/Forms) |  No   
  
##  Syntax

http

    
    
    PATCH /file.txt HTTP/1.1
    

##  Example

###  Request

http

    
    
    PATCH /file.txt HTTP/1.1
    Host: www.example.com
    Content-Type: application/example
    If-Match: "e0023aa4e"
    Content-Length: 100
    
    [description of changes]
    

###  Response

A successful response is indicated by any [ 2xx
](https://httpwg.org/specs/rfc9110.html#status.2xx) status code.

In the example below a [ ` 204 ` ](/en-US/docs/Web/HTTP/Status/204) response
code is used, because the response does not carry a payload body. A [ ` 200 `
](/en-US/docs/Web/HTTP/Status/200) response could have contained a payload
body.

http

    
    
    HTTP/1.1 204 No Content
    Content-Location: /file.txt
    ETag: "e0023aa4f"
    

##  Specifications

Specification  
---  
[ RFC 5789  
](https://www.rfc-editor.org/rfc/rfc5789)  
  
##  See also

  * [ ` 204 ` ](/en-US/docs/Web/HTTP/Status/204)
  * [ ` Allow ` ](/en-US/docs/Web/HTTP/Headers/Allow) , [ ` Access-Control-Allow-Methods ` ](/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods)
  * [ ` Accept-Patch ` ](/en-US/docs/Web/HTTP/Headers/Accept-Patch) â specifies the patch document formats accepted by the server. 

##  Help improve MDN

Was this page helpful to you?

Yes  No

[ Learn how to contribute
](https://github.com/mdn/content/blob/main/CONTRIBUTING.md "This will take you
to our contribution guidelines on GitHub.") .

This page was last modified on  Jul 19, 2023  by  [ MDN contributors ](/en-
US/docs/Web/HTTP/Methods/PATCH/contributors.txt) .

[ View this page on GitHub
](https://github.com/mdn/content/blob/main/files/en-
us/web/http/methods/patch/index.md?plain=1 "Folder: en-
us/web/http/methods/patch \(Opens in a new tab\)") â¢  [ Report a problem
with this content ](https://github.com/mdn/content/issues/new?template=page-
report.yml&mdn-url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-
US%2Fdocs%2FWeb%2FHTTP%2FMethods%2FPATCH&metadata=%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EPage+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-
us%2Fweb%2Fhttp%2Fmethods%2Fpatch%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-
US%2Fdocs%2FWeb%2FHTTP%2FMethods%2FPATCH%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-
us%2Fweb%2Fhttp%2Fmethods%2Fpatch%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2F3138c50f08e9fba1176aa77dbbfdb33e22357ddd%0A*+Document+last+modified%3A+2023-07-19T10%3A44%3A18.000Z%0A%0A%3C%2Fdetails%3E
"This will take you