← Dictionary

refactor

/ˌriːˈfæk.tər/
IELTSAcademic
verb

To change the internal structure of code or a system without changing what it does for users. People do this to make code cleaner, easier to maintain, or faster to work with.

  • We need to refactor the login code.
  • She refactored the module for better readability.
  • The app looks the same after refactoring.

Adinary Nuance

Refactor is more specific than rewrite, which suggests starting again from scratch. It is also more technical than improve or clean up, which are broader and less precise. Use refactor when the main idea is to reorganize the inside of something, especially code, while keeping the result the same.

In other languages

Vietnamese
tái cấu trúc
Spanish
refactorizar
Chinese
重构
Japanese
リファクタリング
Korean
리팩터링

Etymology

Refactor came into English in the late 20th century, especially in software development. It combines re- with factor, from Latin factor meaning 'maker' or 'doer'.

Common phrases

refactor coderefactor a modulerefactor for readability

Synonyms

Related words

Frequently asked questions

Is refactor a formal word?
Yes. It is common in technical and business writing, especially in software teams.
What is the difference between refactor and rewrite?
Refactor changes the structure without changing the result. Rewrite usually means making something again from the beginning.
Can I use refactor outside programming?
Yes, but it is most common for code and other technical systems.
Is refactor a noun or a verb?
It is mainly a verb: 'We need to refactor the code.'